Skip to content

Commit 1a8e0c3

Browse files
authored
Merge pull request #412 from tgross35/gha-update
Switch from actions-rs to preinstalled rustup
2 parents 5032d33 + 0fe5c7f commit 1a8e0c3

File tree

6 files changed

+44
-189
lines changed

6 files changed

+44
-189
lines changed

.github/workflows/ci.yml

+7-31
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ jobs:
3737
steps:
3838
- uses: actions/checkout@v3
3939

40+
# `rustup show` installs from rust-toolchain.toml
41+
- name: Setup rust toolchain
42+
run: rustup show
43+
44+
- name: Setup rust cache
45+
uses: Swatinem/rust-cache@v2
46+
4047
- name: Install packages
4148
# `llvm-14-tools` is needed to install the `FileCheck` binary which is used for asm tests.
4249
run: sudo apt-get install ninja-build ripgrep llvm-14-tools
@@ -63,30 +70,6 @@ jobs:
6370
echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
6471
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
6572
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') }}
89-
9073
#- name: Cache rust repository
9174
## We only clone the rust repository for rustc tests
9275
#if: ${{ contains(matrix.commands, 'rustc') }}
@@ -111,13 +94,6 @@ jobs:
11194
git config --global user.name "User"
11295
./y.sh prepare
11396
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-
12197
- name: Add more failing tests because the sysroot is not compiled with LTO
12298
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt
12399

.github/workflows/failures.yml

+7-31
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ jobs:
3636
steps:
3737
- uses: actions/checkout@v3
3838

39+
# `rustup show` installs from rust-toolchain.toml
40+
- name: Setup rust toolchain
41+
run: rustup show
42+
43+
- name: Setup rust cache
44+
uses: Swatinem/rust-cache@v2
45+
3946
- name: Install packages
4047
run: sudo apt-get install ninja-build ripgrep
4148

@@ -71,30 +78,6 @@ jobs:
7178
echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
7279
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
7380
74-
- name: Cache cargo installed crates
75-
uses: actions/cache@v3
76-
with:
77-
path: ~/.cargo/bin
78-
key: cargo-installed-crates2-ubuntu-latest
79-
80-
- name: Cache cargo registry
81-
uses: actions/cache@v3
82-
with:
83-
path: ~/.cargo/registry
84-
key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}
85-
86-
- name: Cache cargo index
87-
uses: actions/cache@v3
88-
with:
89-
path: ~/.cargo/git
90-
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
91-
92-
- name: Cache cargo target dir
93-
uses: actions/cache@v3
94-
with:
95-
path: target
96-
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
97-
9881
#- name: Cache rust repository
9982
#uses: actions/cache@v3
10083
#id: cache-rust-repository
@@ -115,13 +98,6 @@ jobs:
11598
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
11699
run: ./y.sh prepare
117100

118-
# Compile is a separate step, as the actions-rs/cargo action supports error annotations
119-
- name: Compile
120-
uses: actions-rs/[email protected]
121-
with:
122-
command: build
123-
args: --release
124-
125101
- name: Add more failing tests because the sysroot is not compiled with LTO
126102
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt
127103

.github/workflows/gcc12.yml

+7-31
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@v3
3737

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+
3845
- name: Install packages
3946
# `llvm-14-tools` is needed to install the `FileCheck` binary which is used for asm tests.
4047
run: sudo apt-get install ninja-build ripgrep llvm-14-tools libgccjit-12-dev
@@ -48,30 +55,6 @@ jobs:
4855
echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
4956
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
5057
51-
- name: Cache cargo installed crates
52-
uses: actions/cache@v3
53-
with:
54-
path: ~/.cargo/bin
55-
key: cargo-installed-crates2-ubuntu-latest
56-
57-
- name: Cache cargo registry
58-
uses: actions/cache@v3
59-
with:
60-
path: ~/.cargo/registry
61-
key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}
62-
63-
- name: Cache cargo index
64-
uses: actions/cache@v3
65-
with:
66-
path: ~/.cargo/git
67-
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
68-
69-
- name: Cache cargo target dir
70-
uses: actions/cache@v3
71-
with:
72-
path: target
73-
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
74-
7558
#- name: Cache rust repository
7659
## We only clone the rust repository for rustc tests
7760
#if: ${{ contains(matrix.commands, 'rustc') }}
@@ -94,13 +77,6 @@ jobs:
9477
git config --global user.name "User"
9578
./y.sh prepare --libgccjit12-patches
9679
97-
# Compile is a separate step, as the actions-rs/cargo action supports error annotations
98-
- name: Compile
99-
uses: actions-rs/[email protected]
100-
with:
101-
command: build
102-
args: --release
103-
10480
- name: Add more failing tests for GCC 12
10581
run: cat failing-ui-tests12.txt >> failing-ui-tests.txt
10682

.github/workflows/m68k.yml

+9-33
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,20 @@ jobs:
3636
]
3737

3838
steps:
39+
- uses: actions/checkout@v3
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+
3948
- name: Install packages
4049
run: |
4150
sudo apt-get update
4251
sudo apt-get install qemu qemu-user-static
4352
44-
- uses: actions/checkout@v3
45-
4653
- name: Download GCC artifact
4754
uses: dawidd6/action-download-artifact@v2
4855
with:
@@ -72,30 +79,6 @@ jobs:
7279
echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
7380
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
7481
75-
- name: Cache cargo installed crates
76-
uses: actions/cache@v3
77-
with:
78-
path: ~/.cargo/bin
79-
key: cargo-installed-crates2-ubuntu-latest
80-
81-
#- name: Cache cargo registry
82-
#uses: actions/cache@v3
83-
#with:
84-
#path: ~/.cargo/registry
85-
#key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}
86-
87-
#- name: Cache cargo index
88-
#uses: actions/cache@v3
89-
#with:
90-
#path: ~/.cargo/git
91-
#key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
92-
93-
- name: Cache cargo target dir
94-
uses: actions/cache@v3
95-
with:
96-
path: target
97-
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
98-
9982
#- name: Cache rust repository
10083
## We only clone the rust repository for rustc tests
10184
#if: ${{ contains(matrix.commands, 'rustc') }}
@@ -126,13 +109,6 @@ jobs:
126109
git config --global user.name "User"
127110
./y.sh prepare --cross
128111
129-
# Compile is a separate step, as the actions-rs/cargo action supports error annotations
130-
- name: Compile
131-
uses: actions-rs/[email protected]
132-
with:
133-
command: build
134-
args: --release
135-
136112
- name: Add more failing tests because the sysroot is not compiled with LTO
137113
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt
138114

.github/workflows/release.yml

+7-31
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v3
2828

29+
# `rustup show` installs from rust-toolchain.toml
30+
- name: Setup rust toolchain
31+
run: rustup show
32+
33+
- name: Setup rust cache
34+
uses: Swatinem/rust-cache@v2
35+
2936
- name: Install packages
3037
run: sudo apt-get install ninja-build ripgrep
3138

@@ -51,30 +58,6 @@ jobs:
5158
echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
5259
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
5360
54-
- name: Cache cargo installed crates
55-
uses: actions/cache@v3
56-
with:
57-
path: ~/.cargo/bin
58-
key: cargo-installed-crates2-ubuntu-latest
59-
60-
- name: Cache cargo registry
61-
uses: actions/cache@v3
62-
with:
63-
path: ~/.cargo/registry
64-
key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}
65-
66-
- name: Cache cargo index
67-
uses: actions/cache@v3
68-
with:
69-
path: ~/.cargo/git
70-
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
71-
72-
- name: Cache cargo target dir
73-
uses: actions/cache@v3
74-
with:
75-
path: target
76-
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
77-
7861
- name: Build
7962
run: |
8063
./y.sh prepare --only-libcore
@@ -92,13 +75,6 @@ jobs:
9275
# FIXME(antoyo): we cannot enable LTO for stdarch tests currently because of some failing LTO tests using proc-macros.
9376
echo -n 'lto = "fat"' >> build_sysroot/Cargo.toml
9477
95-
# Compile is a separate step, as the actions-rs/cargo action supports error annotations
96-
- name: Compile
97-
uses: actions-rs/[email protected]
98-
with:
99-
command: build
100-
args: --release
101-
10278
- name: Add more failing tests because of undefined symbol errors (FIXME)
10379
run: cat failing-lto-tests.txt >> failing-ui-tests.txt
10480

.github/workflows/stdarch.yml

+7-32
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v3
2828

29+
# `rustup show` installs from rust-toolchain.toml
30+
- name: Setup rust toolchain
31+
run: rustup show
32+
33+
- name: Setup rust cache
34+
uses: Swatinem/rust-cache@v2
35+
2936
- name: Install packages
3037
run: sudo apt-get install ninja-build ripgrep
3138

@@ -65,30 +72,6 @@ jobs:
6572
echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
6673
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
6774
68-
- name: Cache cargo installed crates
69-
uses: actions/cache@v3
70-
with:
71-
path: ~/.cargo/bin
72-
key: cargo-installed-crates2-ubuntu-latest
73-
74-
- name: Cache cargo registry
75-
uses: actions/cache@v3
76-
with:
77-
path: ~/.cargo/registry
78-
key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}
79-
80-
- name: Cache cargo index
81-
uses: actions/cache@v3
82-
with:
83-
path: ~/.cargo/git
84-
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
85-
86-
- name: Cache cargo target dir
87-
uses: actions/cache@v3
88-
with:
89-
path: target
90-
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
91-
9275
- name: Build
9376
run: |
9477
./y.sh prepare --only-libcore
@@ -108,14 +91,6 @@ jobs:
10891
git config --global user.name "User"
10992
./y.sh prepare
11093
111-
# Compile is a separate step, as the actions-rs/cargo action supports error annotations
112-
- name: Compile
113-
uses: actions-rs/[email protected]
114-
with:
115-
command: build
116-
# TODO: remove `--features master` when it is back to the default.
117-
args: --release --features master
118-
11994
- name: Run tests
12095
if: ${{ !matrix.cargo_runner }}
12196
run: |

0 commit comments

Comments
 (0)