Skip to content

Commit 65f4b63

Browse files
Add CI for download config
1 parent 5c6cdf5 commit 65f4b63

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

.github/workflows/download.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Check download command
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
permissions:
8+
contents: read
9+
10+
env:
11+
# Enable backtraces for easier debugging
12+
RUST_BACKTRACE: 1
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-22.04
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
commands: [
22+
"--mini-tests",
23+
"--std-tests",
24+
# FIXME: re-enable asm tests when GCC can emit in the right syntax.
25+
# "--asm-tests",
26+
"--test-libcore",
27+
"--extended-rand-tests",
28+
"--extended-regex-example-tests",
29+
"--extended-regex-tests",
30+
"--test-successful-rustc --nb-parts 2 --current-part 0",
31+
"--test-successful-rustc --nb-parts 2 --current-part 1",
32+
"--projects",
33+
]
34+
35+
steps:
36+
- uses: actions/checkout@v3
37+
38+
# `rustup show` installs from rust-toolchain.toml
39+
- name: Setup rust toolchain
40+
run: rustup show
41+
42+
- name: Setup rust cache
43+
uses: Swatinem/rust-cache@v2
44+
45+
- name: Install packages
46+
# `llvm-14-tools` is needed to install the `FileCheck` binary which is used for asm tests.
47+
run: sudo apt-get install ninja-build ripgrep llvm-14-tools
48+
49+
- name: Setup path to libgccjit
50+
run: |
51+
echo 'download-gccjit = true' > config.toml
52+
53+
- name: Set env
54+
run: |
55+
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
56+
57+
#- name: Cache rust repository
58+
## We only clone the rust repository for rustc tests
59+
#if: ${{ contains(matrix.commands, 'rustc') }}
60+
#uses: actions/cache@v3
61+
#id: cache-rust-repository
62+
#with:
63+
#path: rust
64+
#key: ${{ runner.os }}-packages-${{ hashFiles('rust/.git/HEAD') }}
65+
66+
- name: Build
67+
run: |
68+
./y.sh prepare --only-libcore
69+
# TODO: remove --features master when it is back to the default.
70+
./y.sh build --features master
71+
# TODO: remove --features master when it is back to the default.
72+
73+
- name: Set env (part 2)
74+
run: |
75+
# Set the `LD_LIBRARY_PATH` and `LIBRARY_PATH` env variables...
76+
echo "LD_LIBRARY_PATH="$(./y.sh info | grep -v Using) >> $GITHUB_ENV
77+
echo "LIBRARY_PATH="$(./y.sh info | grep -v Using) >> $GITHUB_ENV
78+
79+
- name: Build (part 2)
80+
run: |
81+
echo "LIBRARY_PATH=" $LIBRARY_PATH
82+
cargo test --features master
83+
./y.sh clean all
84+
85+
- name: Prepare dependencies
86+
run: |
87+
git config --global user.email "[email protected]"
88+
git config --global user.name "User"
89+
./y.sh prepare
90+
91+
- name: Add more failing tests because the sysroot is not compiled with LTO
92+
run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
93+
94+
- name: Run tests
95+
run: |
96+
# TODO: remove --features master when it is back to the default.
97+
./y.sh test --features master --release --clean --build-sysroot ${{ matrix.commands }}

0 commit comments

Comments
 (0)