1919 fail-fast : false
2020 matrix :
2121 libgccjit_version :
22- - { gcc: "libgccjit.so", artifacts_branch: "master " }
23- - { gcc: "libgccjit_without_int128.so", artifacts_branch: "master- without-128bit-integers " }
22+ - { gcc: "gcc-13.deb " }
23+ - { gcc: "gcc-13- without-int128.deb " }
2424 commands : [
2525 " --mini-tests" ,
2626 " --std-tests" ,
@@ -32,60 +32,39 @@ jobs:
3232 " --extended-regex-tests" ,
3333 " --test-successful-rustc --nb-parts 2 --current-part 0" ,
3434 " --test-successful-rustc --nb-parts 2 --current-part 1" ,
35+ " --projects" ,
3536 ]
3637
3738 steps :
3839 - uses : actions/checkout@v3
3940
41+ # `rustup show` installs from rust-toolchain.toml
42+ - name : Setup rust toolchain
43+ run : rustup show
44+
45+ - name : Setup rust cache
46+ uses : Swatinem/rust-cache@v2
47+
4048 - name : Install packages
4149 # `llvm-14-tools` is needed to install the `FileCheck` binary which is used for asm tests.
4250 run : sudo apt-get install ninja-build ripgrep llvm-14-tools
4351
52+ - name : Install rustfmt
53+ run : rustup component add rustfmt
54+
4455 - name : Download artifact
45- uses : dawidd6/action-download-artifact@v2
46- with :
47- workflow : main.yml
48- name : gcc-13
49- path : gcc-13
50- repo : antoyo/gcc
51- branch : ${{ matrix.libgccjit_version.artifacts_branch }}
52- event : push
53- search_artifacts : true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts.
56+ run : curl -LO https://github.com/antoyo/gcc/releases/latest/download/${{ matrix.libgccjit_version.gcc }}
5457
5558 - name : Setup path to libgccjit
5659 run : |
57- sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb
58- echo /usr/lib/ > gcc_path
60+ sudo dpkg --force-overwrite -i ${{ matrix.libgccjit_version.gcc }}
61+ echo 'gcc-path = " /usr/lib/"' > config.toml
5962
6063 - name : Set env
6164 run : |
62- echo "LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
63- echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
6465 echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
65-
66- - name : Cache cargo installed crates
67- uses : actions/cache@v3
68- with :
69- path : ~/.cargo/bin
70- key : cargo-installed-crates2-ubuntu-latest
71-
72- - name : Cache cargo registry
73- uses : actions/cache@v3
74- with :
75- path : ~/.cargo/registry
76- key : ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}
77-
78- - name : Cache cargo index
79- uses : actions/cache@v3
80- with :
81- path : ~/.cargo/git
82- key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
83-
84- - name : Cache cargo target dir
85- uses : actions/cache@v3
86- with :
87- path : target
88- key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
66+ echo "LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV
67+ echo "LD_LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV
8968
9069 # - name: Cache rust repository
9170 # # We only clone the rust repository for rustc tests
@@ -99,35 +78,37 @@ jobs:
9978 - name : Build
10079 run : |
10180 ./y.sh prepare --only-libcore
102- # TODO: remove --features master when it is back to the default.
103- ./y.sh build --features master
104- # TODO: remove --features master when it is back to the default.
105- cargo test --features master
106- ./clean_all.sh
81+ ./y.sh build
82+ cargo test
83+ ./y.sh clean all
10784
10885 - name : Prepare dependencies
10986 run : |
11087 git config --global user.email "[email protected] " 11188 git config --global user.name "User"
11289 ./y.sh prepare
11390
114- # Compile is a separate step, as the actions-rs/cargo action supports error annotations
115- - name : Compile
116- uses :
actions-rs/[email protected] 117- with :
118- command : build
119- args : --release
120-
12191 - name : Add more failing tests because the sysroot is not compiled with LTO
122- run : cat failing-non-lto-tests.txt >> failing-ui-tests.txt
92+ run : cat tests/ failing-non-lto-tests.txt >> tests/ failing-ui-tests.txt
12393
12494 - name : Run tests
12595 run : |
126- # TODO: remove --features master when it is back to the default.
127- ./test.sh --features master --release --clean --build-sysroot ${{ matrix.commands }}
96+ ./y.sh test --release --clean --build-sysroot ${{ matrix.commands }}
97+
98+ - name : Check formatting
99+ run : cargo fmt -- --check
128100
129101 duplicates :
130102 runs-on : ubuntu-latest
131103 steps :
132104 - uses : actions/checkout@v3
133105 - run : python tools/check_intrinsics_duplicates.py
106+
107+ build_system :
108+ runs-on : ubuntu-latest
109+ steps :
110+ - uses : actions/checkout@v3
111+ - name : Test build system
112+ run : |
113+ cd build_system
114+ cargo test
0 commit comments