Skip to content
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

feat(nix): Add nix derivation and use it in CI #117

Merged
merged 1 commit into from
Apr 17, 2024
Merged
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
17 changes: 12 additions & 5 deletions .github/workflows/amd64-linux-main-proof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- name: extract and check
run: JASMIN=$(which_jasminc) EASYCRYPT=$(which_easycrypt) ECARGS=$(which_eclib) make -j$JOBS -C proof/ CI=1 default
- uses: DeterminateSystems/magic-nix-cache-action@v4

- name: dist
run: ./scripts/ci/releaser/jdist-proof
- name: extract and check
uses: workflow/[email protected]
with:
flakes: .
flakes-from-devshell: true
script: |
# extract and check
make -j$JOBS -C proof/ CI=1 default
# dist
./scripts/ci/releaser/jdist-proof

- name: print logs
run: JASMIN=$(which_jasminc) EASYCRYPT=$(which_easycrypt) ECARGS=$(which_eclib) make -C proof/ CI=1 reporter
run: make -C proof/ CI=1 reporter

- name: return error if there are any errors
run: make -C proof/ CI=1 err
Expand Down
82 changes: 62 additions & 20 deletions .github/workflows/amd64-linux-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- uses: DeterminateSystems/magic-nix-cache-action@v4

- name: compile
run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 default
uses: workflow/[email protected]
with:
flakes: .
flakes-from-devshell: true
script: make -j$JOBS -C src/ CI=1 default

- name: print logs
run: JASMIN=$(which_jasminc) make -C src/ CI=1 reporter
run: make -C src/ CI=1 reporter
- name: return error if there are any errors
run: make -C src/ CI=1 err

Expand All @@ -40,10 +47,17 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- uses: DeterminateSystems/magic-nix-cache-action@v4

- name: compile and run
run: JASMIN=$(which_jasminc) make -j$JOBS -C test/ CI=1 default
uses: workflow/[email protected]
with:
flakes: .
flakes-from-devshell: true
script: make -j$JOBS -C test/ CI=1 default

- name: print logs
run: JASMIN=$(which_jasminc) make -C test/ CI=1 reporter
run: make -C test/ CI=1 reporter
- name: return error if there are any errors
run: make -C test/ CI=1 err

Expand All @@ -63,14 +77,20 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- uses: DeterminateSystems/magic-nix-cache-action@v4

- name: compile
run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 default
uses: workflow/[email protected]
with:
flakes: .
flakes-from-devshell: true
script: make -j$JOBS -C src/ CI=1 default

- name: run
run: JASMIN=$(which_jasminc) make -j$JOBS -C bench/ CI=1 DEFINE='-DTIMINGS=10' run
run: make -j$JOBS -C bench/ CI=1 DEFINE='-DTIMINGS=10' run

- name: print logs
run: JASMIN=$(which_jasminc) make -C bench/ CI=1 reporter
run: make -C bench/ CI=1 reporter

- name: return error if there are any errors
run: make -C bench/ CI=1 err
Expand All @@ -91,14 +111,20 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- uses: DeterminateSystems/magic-nix-cache-action@v4

- name: compile
run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 default
uses: workflow/[email protected]
with:
flakes: .
flakes-from-devshell: true
script: make -j$JOBS -C src/ CI=1 default

- name: run
run: JASMIN=$(which_jasminc) make -j$JOBS -C bench/ CI=1 run DEFINE='-DTIMINGS=10 -DRUNS=2 -DST_ON' RANDINC='../test/common/' RANDLIB='../test/common/notrandombytes.c';
run: make -j$JOBS -C bench/ CI=1 run DEFINE='-DTIMINGS=10 -DRUNS=2 -DST_ON' RANDINC='../test/common/' RANDLIB='../test/common/notrandombytes.c';

- name: print logs
run: JASMIN=$(which_jasminc) make -C bench/ CI=1 reporter
run: make -C bench/ CI=1 reporter

- name: return error if there are any errors
run: make -C bench/ CI=1 err
Expand All @@ -119,12 +145,22 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- uses: DeterminateSystems/magic-nix-cache-action@v4

- name: extract and check
run: JASMIN=$(which_jasminc) EASYCRYPT=$(which_easycrypt) ECARGS=$(which_eclib) make -j$JOBS -C proof/ CI=1 check-extracted
- name: dist
run: ./scripts/ci/releaser/jdist-proof
uses: workflow/[email protected]
with:
flakes: .
flakes-from-devshell: true
script: |
# extract and check
make -j$JOBS -C proof/ CI=1 check-extracted
# dist
./scripts/ci/releaser/jdist-proof

- name: print logs
run: JASMIN=$(which_jasminc) EASYCRYPT=$(which_easycrypt) ECARGS=$(which_eclib) make -C proof/ CI=1 reporter
run: make -C proof/ CI=1 reporter

- name: return error if there are any errors
run: make -C proof/ CI=1 err

Expand All @@ -151,14 +187,20 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- name: compile amd64
run: JASMIN=$(which_jasminc) make -j$JOBS -C src/ CI=1 default
- uses: DeterminateSystems/magic-nix-cache-action@v4

- name: dist amd64
run: JASMIN=$(which_jasminc) ./scripts/ci/releaser/jdist-src-v1 amd64

- name: check dist amd64
run: JASMIN=$(which_jasminc) ./scripts/ci/releaser/jdist-src-test-v1 amd64
uses: workflow/[email protected]
with:
flakes: .
flakes-from-devshell: true
script: |
# compile amd64
make -j$JOBS -C src/ CI=1 default
# dist amd64
./scripts/ci/releaser/jdist-src-v1 amd64
# check dist amd64
./scripts/ci/releaser/jdist-src-test-v1 amd64

- name: libjade-dist-src-amd64.tar.gz - contains assembly, Jasmin, and how-to-use code
if: always()
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.ci
*.tar.gz
libjade-*
.vscode
.vscode
result
Loading
Loading