Skip to content

Commit 5bc16ef

Browse files
committed
Compile program in the nightly CI
1 parent dd50675 commit 5bc16ef

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/nightly_rustc.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,20 @@ jobs:
6565
cd rust
6666
# TODO: add --host=${{ matrix.arch.host_target }} if needed (should not be since it's in the toml config file)
6767
./x build --stage 2 --config ../rustc_codegen_gcc/tests/bootstraps/bootstrap.${{ matrix.arch.host_target }}.toml
68+
69+
- name: Link toolchain
70+
run: rustup toolchain link my-toolchain build/${{ matrix.arch.host_target }}/stage2
71+
72+
- name: Compile test program
73+
run: |
74+
cd rustc_codegen_gcc/tests/hello-world
75+
cargo +my-toolchain build
76+
cargo +my-toolchain run > hello_world_stdout
77+
78+
expected_output="40"
79+
test $(cat hello_world_stdout) == $expected_output || (echo "Output differs. Actual output: $(cat hello_world_stdout)"; exit 1)
80+
81+
objcopy --dump-section .comment=comment target/debug/hello_world
82+
grep --text "^.rustc version .* with libgccjit" comment
83+
grep --text 'libgccjit' comment
84+
grep --text 'GCC: ' comment

0 commit comments

Comments
 (0)