Skip to content

Commit 52d909b

Browse files
committed
Add CI compiling rustc
1 parent 059950e commit 52d909b

3 files changed

Lines changed: 91 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Nightly compilation of rustc with rustc_codegen_gcc
2+
3+
on:
4+
pull_request:
5+
# TODO: remove pull_request and add schedule to run during the night.
6+
7+
env:
8+
# Enable backtraces for easier debugging
9+
RUST_BACKTRACE: 1
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-24.04
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
arch:
19+
- host_target: "x86_64-unknown-linux-gnu"
20+
gcc_urls: >
21+
https://github.com/rust-lang/gcc/releases/latest/download/gcc-15.deb
22+
- host_target: "m68k-unknown-linux-gnu"
23+
gcc_urls: >
24+
https://github.com/rust-lang/gcc/releases/latest/download/gcc-15.deb
25+
https://github.com/cross-cg-gcc-tools/cross-gcc/releases/latest/download/gcc-m68k-15.deb
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- run: |
31+
ls
32+
echo "*****"
33+
ls rustc_codegen_gcc
34+
echo "*****"
35+
36+
- uses: actions/checkout@v4
37+
with:
38+
repository: "https://github.com/rust-lang/rust"
39+
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+
47+
- name: Download and install artifacts
48+
run: |
49+
urls=(${{ matrix.arch.gcc_urls[@] }})
50+
for url in "${urls[@]}"; do
51+
curl -L -o package.deb $url
52+
sudo dpkg --force-overwrite -i package.deb
53+
done
54+
55+
# TODO: patch linux-raw-sys and rustix.
56+
57+
- name: Compile rustc
58+
run: |
59+
cd rust
60+
# TODO: add --host=${{ matrix.arch.host_target }} if needed (should not be since it's in the toml config file)
61+
./x build --stage 2 --config ../rustc_codegen_gcc/tests/bootstraps/bootstrap.${{ matrix.arch.host_target }}.toml
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
profile = "compiler"
2+
change-id = 140732
3+
4+
[build]
5+
target = ["m68k-unknown-linux-gnu"]
6+
7+
[rust]
8+
codegen-backends = ["gcc"]
9+
deny-warnings = false
10+
debug-assertions = false
11+
debug-assertions-std = false
12+
13+
[gcc]
14+
download-ci-gcc = true
15+
libgccjit-libs-dir = "/home/user/libgccjit-libs-dir"
16+
17+
[target.m68k-unknown-linux-gnu]
18+
# TODO: fix if needed:
19+
#cc = "/home/user/x-tools/m68k-unknown-linux-gnu/usr/bin/m68k-unknown-linux-gnu-gcc"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
profile = "compiler"
2+
change-id = 140732
3+
4+
[rust]
5+
codegen-backends = ["gcc"]
6+
deny-warnings = false
7+
debug-assertions = false
8+
debug-assertions-std = false
9+
10+
[gcc]
11+
download-ci-gcc = true

0 commit comments

Comments
 (0)