-
Notifications
You must be signed in to change notification settings - Fork 10
68 lines (62 loc) · 2.03 KB
/
test-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: 'Test PR'
on:
pull_request:
branches:
- 'master'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-quality-checks:
name: 'Code Quality Checks'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v4
- name: 'Install Poetry'
uses: Gr1N/setup-poetry@v9
- name: 'Run code quality checks'
run: make -C krypto check
- name: 'Run pyupgrade'
run: make -C krypto pyupgrade
test-pr:
name: 'Build and test Blockchain Plugin'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
tag: blockchain-k-plugin-concrete-${{ github.sha }}
distro: jammy
llvm-version: 15
- name: 'Compile Deps'
run: docker exec -t blockchain-k-plugin-concrete-${GITHUB_SHA} /bin/bash -c 'make -j`nproc` CXX=clang++-14 libff libcryptopp'
- name: 'Compile'
run: docker exec -t blockchain-k-plugin-concrete-${GITHUB_SHA} /bin/bash -c 'make -j`nproc` CXX=clang++-14'
- name: 'Test'
run: docker exec -t blockchain-k-plugin-concrete-${GITHUB_SHA} make test
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 blockchain-k-plugin-concrete-${GITHUB_SHA}
nix:
name: 'Nix'
strategy:
fail-fast: false
matrix:
include:
- runner: normal
- runner: ARM64
needs: code-quality-checks
runs-on: ${{ matrix.runner }}
steps:
- name: 'Check out code'
uses: actions/checkout@v4
- name: 'Build plugin'
run: GC_DONT_GC=1 nix build .#blockchain-k-plugin --extra-experimental-features 'nix-command flakes' --print-build-logs
- name: 'Test plugin'
run: GC_DONT_GC=1 nix build .#py-krypto-tests --extra-experimental-features 'nix-command flakes' --print-build-logs