Skip to content

Commit 38e8e85

Browse files
committed
Add CI compiling rustc
1 parent 059950e commit 38e8e85

File tree

3 files changed

+95
-0
lines changed

3 files changed

+95
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
with:
30+
path: "rustc_codegen_gcc"
31+
32+
- uses: actions/checkout@v4
33+
with:
34+
repository: "rust-lang/rust"
35+
path: "rust"
36+
fetch-depth: 10
37+
38+
- run: |
39+
ls
40+
echo "*****"
41+
ls ..
42+
echo "*****"
43+
ls rust
44+
echo "*****"
45+
46+
# `rustup show` installs from rust-toolchain.toml
47+
- name: Setup rust toolchain
48+
run: rustup show
49+
50+
- name: Setup rust cache
51+
uses: Swatinem/rust-cache@v2
52+
53+
- name: Download and install artifacts
54+
run: |
55+
urls=(${{ matrix.arch.gcc_urls }})
56+
for url in "${urls[@]}"; do
57+
curl -L -o package.deb $url
58+
sudo dpkg --force-overwrite -i package.deb
59+
done
60+
61+
# TODO: patch linux-raw-sys and rustix.
62+
63+
- name: Compile rustc
64+
run: |
65+
cd rust
66+
./x build --host=${{ matrix.arch.host_target }} --stage 2 --config ../rustc_codegen_gcc/tests/bootstraps/bootstrap.${{ matrix.arch.host_target }}.toml
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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/runner/libgccjit-libs-dir"
16+
17+
[target.m68k-unknown-linux-gnu]
18+
cc = "/home/runner/work/rustc_codegen_gcc/rustc_codegen_gcc/cross-gcc/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)