31
31
os : ubuntu-24.04-arm
32
32
multiarch : armhf
33
33
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
34
39
- host_target : aarch64-apple-darwin
35
40
os : macos-latest
36
41
- host_target : i686-pc-windows-msvc
@@ -40,26 +45,32 @@ jobs:
40
45
HOST_TARGET : ${{ matrix.host_target }}
41
46
steps :
42
47
- 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
44
52
if : ${{ matrix.multiarch != '' }}
45
53
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
46
57
sudo dpkg --add-architecture ${{ matrix.multiarch }}
47
58
sudo apt update
59
+ # Install needed packages
48
60
sudo apt install $(echo "libatomic1: zlib1g-dev:" | sed 's/:/:${{ matrix.multiarch }}/g')
49
61
- uses : ./.github/workflows/setup
50
62
with :
51
63
toolchain_flags : " --host ${{ matrix.host_target }}"
52
64
53
65
# We set up the cross-compiler *after* the basic setup as setting CC would otherwise
54
66
# cause confusion.
55
- - name : gcc-cross setup
67
+ - name : install gcc-cross
56
68
if : ${{ matrix.gcc_cross != '' }}
57
69
run : |
58
70
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
63
74
64
75
- name : Test Miri
65
76
run : ./ci/ci.sh
0 commit comments