Skip to content

Commit 8bd34b1

Browse files
committed
let's see if we can just use the qemu-user stuff...
1 parent 2b3346f commit 8bd34b1

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ jobs:
3131
os: ubuntu-24.04-arm
3232
multiarch: armhf
3333
gcc_cross: arm-linux-gnueabihf
34+
- host_target: s390x-unknown-linux-gnu
35+
os: ubuntu-latest
36+
multiarch: s390x
37+
gcc_cross: s390x-linux-gnu
38+
qemu: true
3439
- host_target: aarch64-apple-darwin
3540
os: macos-latest
3641
- host_target: i686-pc-windows-msvc
@@ -40,26 +45,32 @@ jobs:
4045
HOST_TARGET: ${{ matrix.host_target }}
4146
steps:
4247
- uses: actions/checkout@v4
43-
- name: multiarch setup
48+
- name: install qemu
49+
if: ${{ matrix.qemu }}
50+
run: sudo apt install qemu-user qemu-user-binfmt
51+
- name: install multiarch
4452
if: ${{ matrix.multiarch != '' }}
4553
run: |
54+
# s390x, ppc64el need Ubuntu Ports to be in the mirror list
55+
sudo bash -c "echo 'https://ports.ubuntu.com/ priority:4' >> /etc/apt/apt-mirrors.txt"
56+
# Add architecture
4657
sudo dpkg --add-architecture ${{ matrix.multiarch }}
4758
sudo apt update
59+
# Install needed packages
4860
sudo apt install $(echo "libatomic1: zlib1g-dev:" | sed 's/:/:${{ matrix.multiarch }}/g')
4961
- uses: ./.github/workflows/setup
5062
with:
5163
toolchain_flags: "--host ${{ matrix.host_target }}"
5264

5365
# We set up the cross-compiler *after* the basic setup as setting CC would otherwise
5466
# cause confusion.
55-
- name: gcc-cross setup
67+
- name: install gcc-cross
5668
if: ${{ matrix.gcc_cross != '' }}
5769
run: |
5870
sudo apt install gcc-${{ matrix.gcc_cross }}
59-
echo "CC=${{ matrix.gcc_cross }}-gcc" >> $GITHUB_ENV
60-
mkdir -p .cargo
61-
echo '[target.${{ matrix.host_target }}]' >> .cargo/config.toml
62-
echo 'linker = "${{ matrix.gcc_cross }}-gcc"' >> .cargo/config.toml
71+
echo "CC=${{ matrix.gcc_cross }}-gcc" | tee -a $GITHUB_ENV
72+
TARGET_UPPERCASE=$(echo ${{ matrix.host_target }} | tr '[:lower:]-' '[:upper:]_')
73+
echo "CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=${{ matrix.gcc_cross }}-gcc" | tee -a $GITHUB_ENV
6374
6475
- name: Test Miri
6576
run: ./ci/ci.sh

ci/ci.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ case $HOST_TARGET in
169169
# Host
170170
GC_STRESS=1 MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests
171171
;;
172+
s390x-unknown-linux-gnu)
173+
# Build-only runner; this is quite slow due to emulation.
174+
;;
172175
aarch64-apple-darwin)
173176
# Host
174177
GC_STRESS=1 MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests

0 commit comments

Comments
 (0)