Skip to content

feat: compressible proc macro draft #1857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
shell: bash
- name: Check workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
shell: bash
10 changes: 6 additions & 4 deletions .github/workflows/light-examples-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
- main
paths:
- "examples/**"
- "program-tests/sdk-anchor-test/**"
- "program-tests/sdk-pinocchio-test/**"
- "sdk-libs/**"
pull_request:
branches:
- "*"
paths:
- "examples/**"
- "program-tests/sdk-anchor-test/**"
- "program-tests/sdk-pinocchio-test/**"
- "sdk-libs/**"
types:
- opened
Expand All @@ -24,56 +28,54 @@
cancel-in-progress: true

jobs:
system-programs:
name: system-programs
examples-tests:
name: examples-tests
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 60

services:
redis:
image: redis:8.0.1
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5

env:
REDIS_URL: redis://localhost:6379

strategy:
matrix:
include:
- program: sdk-test-program
sub-tests: '["cargo-test-sbf -p sdk-test"]'
- program: sdk-anchor-test-program
sub-tests: '["cargo-test-sbf -p sdk-anchor-test", "cargo-test-sbf -p sdk-pinocchio-test"]'

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup and build
uses: ./.github/actions/setup-and-build
with:
skip-components: "redis"

- name: build-programs
run: |
source ./scripts/devenv.sh
npx nx build @lightprotocol/programs

- name: ${{ matrix.program }}
run: |
source ./scripts/devenv.sh
npx nx build @lightprotocol/zk-compression-cli

IFS=',' read -r -a sub_tests <<< "${{ join(fromJSON(matrix['sub-tests']), ', ') }}"
for subtest in "${sub_tests[@]}"
do
echo "$subtest"
eval "RUSTFLAGS=\"-D warnings\" $subtest"
done

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
89 changes: 89 additions & 0 deletions .github/workflows/sdk-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
on:
push:
branches:
- main
paths:
- "sdk-tests/**"
- "sdk-libs/**"
- "program-libs/**"
- ".github/workflows/sdk-tests.yml"
pull_request:
branches:
- "*"
paths:
- "sdk-tests/**"
- "sdk-libs/**"
- "program-libs/**"
- ".github/workflows/sdk-tests.yml"
types:
- opened
- synchronize
- reopened
- ready_for_review

name: sdk-tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
sdk-tests:
name: sdk-tests
if: github.event.pull_request.draft == false
runs-on: warp-ubuntu-latest-x64-4x
timeout-minutes: 60

services:
redis:
image: redis:8.0.1
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5

env:
REDIS_URL: redis://localhost:6379
RUST_MIN_STACK: 8388608

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup and build
uses: ./.github/actions/setup-and-build
with:
skip-components: "redis"

- name: Build CLI
run: |
source ./scripts/devenv.sh
npx nx build @lightprotocol/zk-compression-cli

- name: Build core programs
run: |
source ./scripts/devenv.sh
npx nx build @lightprotocol/programs

- name: Build and test all sdk-tests programs
run: |
source ./scripts/devenv.sh
# Increase stack size for SBF compilation to avoid regex_automata stack overflow
export RUST_MIN_STACK=16777216
# Remove -D warnings flag for SBF compilation to avoid compilation issues
export RUSTFLAGS=""

echo "Building and testing all sdk-tests programs sequentially..."
# Build and test each program one by one to ensure .so files exist

echo "Building and testing native-compressible"
cargo-test-sbf -p native-compressible

echo "Building and testing anchor-compressible"
cargo-test-sbf -p anchor-compressible

echo "Building and testing anchor-compressible-derived"
cargo-test-sbf -p anchor-compressible-derived
Loading
Loading