Skip to content

Refactor ci with private nix action #277

Refactor ci with private nix action

Refactor ci with private nix action #277

name: amd64-linux-main
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
defaults:
run:
shell: nix develop -c bash -e {0}
jobs:
compile:
runs-on: [self-hosted, linux, X64, amd64-main]
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup nix
uses: ./.github/actions/setup-nix
- name: compile
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
run: make -C src/ CI=1 err
- name: libjade-logs-src.tar.gz - contains non-empty logs and errors
if: always()
uses: actions/upload-artifact@v4
with:
name: libjade-logs-src.tar.gz
path: src/libjade-logs-src.tar.gz
test:
needs: [compile]
runs-on: [self-hosted, linux, X64, amd64-main]
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup nix
uses: ./.github/actions/setup-nix
- name: compile and run
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
run: make -C test/ CI=1 err
- name: libjade-logs-test.tar.gz - contains non-empty logs and errors
if: always()
uses: actions/upload-artifact@v4
with:
name: libjade-logs-test.tar.gz
path: test/libjade-logs-test.tar.gz
bench1:
needs: [compile]
runs-on: [self-hosted, linux, X64, amd64-main]
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup nix
uses: ./.github/actions/setup-nix
- name: compile
run: make -j$JOBS -C src/ CI=1 default
- name: run
run: make -j$JOBS -C bench/ CI=1 DEFINE='-DTIMINGS=10' run
- name: print logs
run: make -C bench/ CI=1 reporter
- name: return error if there are any errors
run: make -C bench/ CI=1 err
- name: libjade-logs-bench.tar.gz - contains non-empty logs and errors
if: always()
uses: actions/upload-artifact@v4
with:
name: libjade-logs-bench1.tar.gz
path: bench/libjade-logs-bench.tar.gz
bench2:
needs: [compile]
runs-on: [self-hosted, linux, X64, amd64-main]
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup nix
uses: ./.github/actions/setup-nix
- name: compile
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';
- name: print logs
run: make -C bench/ CI=1 reporter
- name: return error if there are any errors
run: make -C bench/ CI=1 err
- name: libjade-logs-bench.tar.gz - contains non-empty logs and errors
if: always()
uses: actions/upload-artifact@v4
with:
name: libjade-logs-bench2.tar.gz
path: bench/libjade-logs-bench.tar.gz
proof-extracted:
needs: [test]
runs-on: [self-hosted, linux, X64, amd64-main]
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup nix
uses: ./.github/actions/setup-nix
- name: extract and check
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
- name: return error if there are any errors
run: make -C proof/ CI=1 err
- name: libjade-logs-proof.tar.gz - contains non-empty logs and errors
if: always()
uses: actions/upload-artifact@v4
with:
name: libjade-logs-proof.tar.gz
path: proof/libjade-logs-proof.tar.gz
- name: libjade-dist-proof.tar.gz - contains all EasyCrypt files and test.config
if: always()
uses: actions/upload-artifact@v4
with:
name: libjade-dist-proof.tar.gz
path: libjade-dist-proof.tar.gz
dist-amd64:
needs: [compile]
runs-on: [self-hosted, linux, X64, amd64-main]
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup nix
uses: ./.github/actions/setup-nix
- name: dist 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()
uses: actions/upload-artifact@v4
with:
name: libjade-dist-src-amd64.tar.gz
path: libjade-dist-src-amd64.tar.gz