19
19
fail-fast : false
20
20
matrix :
21
21
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 " }
24
24
commands : [
25
25
" --mini-tests" ,
26
26
" --std-tests" ,
@@ -32,60 +32,39 @@ jobs:
32
32
" --extended-regex-tests" ,
33
33
" --test-successful-rustc --nb-parts 2 --current-part 0" ,
34
34
" --test-successful-rustc --nb-parts 2 --current-part 1" ,
35
+ " --projects" ,
35
36
]
36
37
37
38
steps :
38
39
- uses : actions/checkout@v3
39
40
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
+
40
48
- name : Install packages
41
49
# `llvm-14-tools` is needed to install the `FileCheck` binary which is used for asm tests.
42
50
run : sudo apt-get install ninja-build ripgrep llvm-14-tools
43
51
52
+ - name : Install rustfmt
53
+ run : rustup component add rustfmt
54
+
44
55
- 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 }}
54
57
55
58
- name : Setup path to libgccjit
56
59
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
59
62
60
63
- name : Set env
61
64
run : |
62
- echo "LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
63
- echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
64
65
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
89
68
90
69
# - name: Cache rust repository
91
70
# # We only clone the rust repository for rustc tests
@@ -99,35 +78,37 @@ jobs:
99
78
- name : Build
100
79
run : |
101
80
./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
107
84
108
85
- name : Prepare dependencies
109
86
run : |
110
87
git config --global user.email "user@example.com"
111
88
git config --global user.name "User"
112
89
./y.sh prepare
113
90
114
- # Compile is a separate step, as the actions-rs/cargo action supports error annotations
115
- - name : Compile
116
- uses : actions-rs/cargo@v1.0.3
117
- with :
118
- command : build
119
- args : --release
120
-
121
91
- 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
123
93
124
94
- name : Run tests
125
95
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
128
100
129
101
duplicates :
130
102
runs-on : ubuntu-latest
131
103
steps :
132
104
- uses : actions/checkout@v3
133
105
- 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