forked from powdr-labs/powdr
-
Notifications
You must be signed in to change notification settings - Fork 12
85 lines (76 loc) · 2.6 KB
/
nightly-tests.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Nightly tests
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
env:
CARGO_TERM_COLOR: always
jobs:
check_if_needs_running:
runs-on: ubuntu-latest
outputs:
status: ${{ steps.count.outputs.status }}
steps:
- uses: actions/checkout@v3
- name: Count recent commits
id: count
run: echo "status=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_OUTPUT
udeps:
runs-on: ubuntu-latest
needs: check_if_needs_running
if: needs.check_if_needs_running.outputs.status > 0
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Run cargo-udeps
uses: aig787/cargo-udeps-action@v1
with:
version: 'latest'
args: '--all-targets'
test_release:
runs-on: ubuntu-latest
needs: check_if_needs_running
if: needs.check_if_needs_running.outputs.status > 0
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: ⚡ Cache rust
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.toml') }}
- name: ⚡ Cache nodejs
uses: actions/cache@v3
with:
path: |
~/pilcom/node_modules
key: ${{ runner.os }}-pilcom-node-modules
- name: Install Rust toolchain 1.72
run: rustup toolchain install 1.72-x86_64-unknown-linux-gnu
- name: Install nightly
run: rustup toolchain install nightly-2023-01-03-x86_64-unknown-linux-gnu
- name: Install riscv target
run: rustup target add riscv32imac-unknown-none-elf --toolchain nightly-2023-01-03-x86_64-unknown-linux-gnu
- name: Install stdlib
run: rustup component add rust-src --toolchain nightly-2023-01-03-x86_64-unknown-linux-gnu
- name: Install pilcom
run: git clone https://github.com/0xPolygonHermez/pilcom.git && cd pilcom && npm install
- name: Check without Halo2
run: cargo check --all --no-default-features
- name: Build
run: cargo build --all --release --all-features
- name: Run tests
# Number threads is set to 1 because the runner does not have enough memeory for more.
run: PILCOM=$(pwd)/pilcom/ cargo test --all --release --verbose --all-features -- --include-ignored --nocapture --test-threads=1
- name: Run benchmarks
run: cargo bench
working-directory: compiler