Skip to content

Commit 3860631

Browse files
committed
Compile program in the nightly CI
1 parent 38e8e85 commit 3860631

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/nightly_rustc.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,20 @@ jobs:
6464
run: |
6565
cd rust
6666
./x build --host=${{ matrix.arch.host_target }} --stage 2 --config ../rustc_codegen_gcc/tests/bootstraps/bootstrap.${{ matrix.arch.host_target }}.toml
67+
68+
- name: Link toolchain
69+
run: rustup toolchain link my-toolchain build/${{ matrix.arch.host_target }}/stage2
70+
71+
- name: Compile test program
72+
run: |
73+
cd rustc_codegen_gcc/tests/hello-world
74+
cargo +my-toolchain build
75+
76+
objcopy --dump-section .comment=comment target/debug/hello_world
77+
grep "rustc version .* with libgccjit" comment
78+
grep 'GCC: ' comment
79+
80+
cargo +my-toolchain run > 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)

0 commit comments

Comments
 (0)