-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (43 loc) · 2.03 KB
/
nightly_run.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
name: gccrs-testing-nightly-run
on:
schedule:
- cron: '0 2 * * *' # Run at 2 AM UTC. Does not really matter
workflow_dispatch:
jobs:
run-testsuites:
runs-on: self-hosted
container: philberty/gccrs:latest
strategy:
matrix:
testsuite: [rustc-dejagnu, gccrs-parsing, gccrs-rustc-success, gccrs-rustc-success-no-std, gccrs-rustc-success-no-core, blake3, libcore]
# testsuite: [blake3]
steps:
- name: Fetch dependencies
run: |
# FIXME: Switch to `cargo install ftf` on next release, we need the
# `result-fmt` feature
cargo install --git https://github.com/cohenarthur/ftf
git config --global --add safe.directory "$GITHUB_WORKSPACE"
# we clone new versions of gccrs and rustc, so we must first delete the old ones if they exist
rm -rf local_gccrs || true
rm -rf local_rust || true
git clone https://github.com/rust-gcc/gccrs --depth=1 local_gccrs
git clone https://github.com/rust-lang/rust --branch 1.49.0 local_rust
- name: Generate testsuites (nightly)
run: |
cargo build --release
target/release/testsuite-adaptor --gccrs $(find /usr/local -name 'crab1') --rustc rustc \
--output-dir output-dir-${{ matrix.testsuite }} \
--yaml ${{ matrix.testsuite }}.yaml \
--rust-path local_rust --gccrs-path local_gccrs \
--pass ${{ matrix.testsuite }}
- name: Run testsuite
run: |
echo "{ \"name\": \"${{matrix.testsuite}}\", \"commit\": \"$(cat /GCCRS_BUILD)\", \"date\": \"$(date -I)\", \"results\": " > ${{ matrix.testsuite }}.json
ftf -f ${{ matrix.testsuite }}.yaml -j 1 --result-fmt "{ \"tests\": %t, \"passes\": %p, \"failures\": %f }" | tee log;
tail -n 1 log >> ${{ matrix.testsuite }}.json
echo "}" >> ${{ matrix.testsuite }}.json
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.testsuite }}.json
path: ${{ matrix.testsuite }}.json