Skip to content
Draft
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
34 changes: 34 additions & 0 deletions .github/actions/setup-nix/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: Apache-2.0

name: Setup nix
description: Setup nix

inputs:
script:
description: The script to be run in the nix shell
required: false
devShell:
description: The name of the devShell
required: true
default: 'default'
init:
description: The init system to configure ('systemd' or 'none')
required: false
default: 'none'

runs:
using: composite
steps:
- uses: DeterminateSystems/nix-installer-action@v12
with:
init: ${{ inputs.init }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Prepare nix dev shell
shell: nix develop .#${{ inputs.devShell }} -c bash -e {0}
run: |
- name: Dependency check
shell: nix develop .#${{ inputs.devShell }} -c bash -e {0}
if: inputs.script != ''
env:
INPUT_SCRIPT: ${{ inputs.script }}
run: eval "$INPUT_SCRIPT"
21 changes: 11 additions & 10 deletions .github/workflows/amd64-linux-main-proof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- main
pull_request:

defaults:
run:
shell: nix develop -c bash -e {0}

jobs:


Expand All @@ -17,18 +21,15 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- uses: DeterminateSystems/magic-nix-cache-action@v4
- name: Setup nix
uses: ./.github/actions/setup-nix

- 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
run: |
# extract and check
make -j$JOBS -C proof/ CI=1 default
# dist
./scripts/ci/releaser/jdist-proof

- name: print logs
run: make -C proof/ CI=1 reporter
Expand Down
81 changes: 32 additions & 49 deletions .github/workflows/amd64-linux-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- main
pull_request:

defaults:
run:
shell: nix develop -c bash -e {0}

jobs:


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

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

- name: Setup nix
uses: ./.github/actions/setup-nix
- name: compile
uses: workflow/[email protected]
with:
flakes: .
flakes-from-devshell: true
script: make -j$JOBS -C src/ CI=1 default

run: make -j$JOBS -C src/ CI=1 default
- name: print logs
run: make -C src/ CI=1 reporter
- name: return error if there are any errors
Expand All @@ -47,15 +46,11 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- uses: DeterminateSystems/magic-nix-cache-action@v4
- name: Setup nix
uses: ./.github/actions/setup-nix

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

run: make -j$JOBS -C test/ CI=1 default
- name: print logs
run: make -C test/ CI=1 reporter
- name: return error if there are any errors
Expand All @@ -77,14 +72,11 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- uses: DeterminateSystems/magic-nix-cache-action@v4
- name: Setup nix
uses: ./.github/actions/setup-nix

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

- name: run
run: make -j$JOBS -C bench/ CI=1 DEFINE='-DTIMINGS=10' run
Expand All @@ -111,14 +103,11 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- uses: DeterminateSystems/magic-nix-cache-action@v4
- name: Setup nix
uses: ./.github/actions/setup-nix

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

- name: run
run: make -j$JOBS -C bench/ CI=1 run DEFINE='-DTIMINGS=10 -DRUNS=2 -DST_ON' RANDINC='../test/common/' RANDLIB='../test/common/notrandombytes.c';
Expand All @@ -145,18 +134,15 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- uses: DeterminateSystems/magic-nix-cache-action@v4
- name: Setup nix
uses: ./.github/actions/setup-nix

- 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 check-extracted
# dist
./scripts/ci/releaser/jdist-proof
run: |
# extract and check
make -j$JOBS -C proof/ CI=1 check-extracted
# dist
./scripts/ci/releaser/jdist-proof

- name: print logs
run: make -C proof/ CI=1 reporter
Expand Down Expand Up @@ -187,20 +173,17 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- uses: DeterminateSystems/magic-nix-cache-action@v4
- name: Setup nix
uses: ./.github/actions/setup-nix

- name: dist 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
run: |
# 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