Skip to content

Commit 7f145ec

Browse files
committed
Compile program in the nightly CI
1 parent dd50675 commit 7f145ec

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/nightly_rustc.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,31 @@ 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 --text "^.rustc version .* with libgccjit" comment
91+
echo "*** 5"
92+
grep --text 'libgccjit' comment
93+
echo "*** 6"
94+
grep --text 'GCC: ' comment
95+
echo "*** 7"

0 commit comments

Comments
 (0)