Skip to content

Commit d19da48

Browse files
committed
Compile program in the nightly CI
1 parent 7b1d8a3 commit d19da48

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/nightly_rustc.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,29 @@ 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+
echo "*** 1"
77+
cargo +my-toolchain run > hello_world_stdout
78+
79+
echo "*** 2"
80+
echo hello_world_stdout
81+
82+
expected_output="40"
83+
test $(cat hello_world_stdout) == $expected_output || (echo "Output differs. Actual output: $(cat hello_world_stdout)"; exit 1)
84+
85+
echo "*** 3"
86+
87+
objcopy --dump-section .comment=comment target/debug/hello_world
88+
cat comment
89+
echo "*** 4"
90+
grep "rustc version .* with libgccjit" comment
91+
echo "*** 5"
92+
grep 'GCC: ' comment
93+
echo "*** 7"

0 commit comments

Comments
 (0)