@@ -5,6 +5,125 @@ name: Test rustix's users
5
5
on : workflow_dispatch
6
6
7
7
jobs :
8
+ listenfd :
9
+ name : listenfd ported to rustix
10
+ runs-on : ${{ matrix.os }}
11
+ strategy :
12
+ matrix :
13
+ build : [ubuntu, i686-linux, aarch64-linux, powerpc64le-linux, riscv64-linux, arm-linux, macos-11]
14
+ include :
15
+ - build : ubuntu
16
+ os : ubuntu-latest
17
+ rust : nightly
18
+ - build : i686-linux
19
+ os : ubuntu-latest
20
+ rust : nightly
21
+ target : i686-unknown-linux-gnu
22
+ gcc_package : gcc-i686-linux-gnu
23
+ gcc : i686-linux-gnu-gcc
24
+ libc_package : libc-dev-i386-cross
25
+ - build : aarch64-linux
26
+ os : ubuntu-latest
27
+ rust : nightly
28
+ target : aarch64-unknown-linux-gnu
29
+ gcc_package : gcc-aarch64-linux-gnu
30
+ gcc : aarch64-linux-gnu-gcc
31
+ qemu : qemu-aarch64 -L /usr/aarch64-linux-gnu
32
+ qemu_target : aarch64-linux-user
33
+ - build : powerpc64le-linux
34
+ os : ubuntu-latest
35
+ rust : nightly
36
+ target : powerpc64le-unknown-linux-gnu
37
+ gcc_package : gcc-powerpc64le-linux-gnu
38
+ gcc : powerpc64le-linux-gnu-gcc
39
+ qemu : qemu-ppc64le -L /usr/powerpc64le-linux-gnu
40
+ qemu_target : ppc64le-linux-user
41
+ - build : riscv64-linux
42
+ os : ubuntu-latest
43
+ rust : nightly
44
+ target : riscv64gc-unknown-linux-gnu
45
+ gcc_package : gcc-riscv64-linux-gnu
46
+ gcc : riscv64-linux-gnu-gcc
47
+ qemu : qemu-riscv64 -L /usr/riscv64-linux-gnu
48
+ qemu_target : riscv64-linux-user
49
+ - build : arm-linux
50
+ os : ubuntu-latest
51
+ rust : nightly
52
+ target : armv5te-unknown-linux-gnueabi
53
+ gcc_package : gcc-arm-linux-gnueabi
54
+ gcc : arm-linux-gnueabi-gcc
55
+ qemu : qemu-arm -L /usr/arm-linux-gnueabi
56
+ qemu_target : arm-linux-user
57
+ - build : macos-11
58
+ os : macos-11
59
+ rust : nightly
60
+ steps :
61
+ - uses : actions/checkout@v2
62
+ - uses : ./.github/actions/install-rust
63
+ with :
64
+ toolchain : ${{ matrix.rust }}
65
+ - uses : actions/checkout@v2
66
+ with :
67
+ repository : sunfishcode/rust-listenfd
68
+ path : rust-listenfd
69
+ - uses : actions/checkout@v2
70
+ with :
71
+ repository : davidedelpapa/thttp
72
+ path : thttp
73
+
74
+ - name : Configure Cargo target
75
+ run : |
76
+ echo CARGO_BUILD_TARGET=${{ matrix.target }} >> $GITHUB_ENV
77
+ rustup target add ${{ matrix.target }}
78
+ if : matrix.target != ''
79
+
80
+ - name : Install cross-compilation tools
81
+ run : |
82
+ set -ex
83
+ sudo apt-get update
84
+ sudo apt-get install -y ${{ matrix.gcc_package }} ninja-build
85
+ upcase=$(echo ${{ matrix.target }} | awk '{ print toupper($0) }' | sed 's/-/_/g')
86
+ echo CARGO_TARGET_${upcase}_LINKER=${{ matrix.gcc }} >> $GITHUB_ENV
87
+ if : matrix.gcc_package != '' && matrix.os == 'ubuntu-latest'
88
+
89
+ - name : Install cross-compilation libraries
90
+ run : |
91
+ set -ex
92
+ sudo apt-get update
93
+ sudo apt-get install -y ${{ matrix.libc_package }}
94
+ if : matrix.libc_package != '' && matrix.os == 'ubuntu-latest'
95
+
96
+ - name : Install qemu
97
+ run : |
98
+ set -ex
99
+ # Download and build qemu from source since the most recent release is
100
+ # way faster at arm emulation than the current version github actions'
101
+ # ubuntu image uses. Disable as much as we can to get it to build
102
+ # quickly.
103
+ cd
104
+ curl https://download.qemu.org/qemu-6.1.0.tar.xz | tar xJf -
105
+ cd qemu-6.1.0
106
+ ./configure --target-list=${{ matrix.qemu_target }} --prefix=$HOME/qemu --disable-tools --disable-slirp --disable-fdt --disable-capstone --disable-docs
107
+ make -j$(nproc) install
108
+
109
+ # Configure Cargo for cross compilation and tell it how it can run
110
+ # cross executables
111
+ upcase=$(echo ${{ matrix.target }} | awk '{ print toupper($0) }' | sed 's/-/_/g')
112
+ echo CARGO_TARGET_${upcase}_RUNNER=$HOME/qemu/bin/${{ matrix.qemu }} >> $GITHUB_ENV
113
+ if : matrix.qemu != '' && matrix.os == 'ubuntu-latest'
114
+
115
+ - run : cargo install systemfd
116
+
117
+ - run : cd rust-listenfd && echo '[patch.crates-io]' >> Cargo.toml
118
+ - run : cd rust-listenfd && echo 'rustix = { path = ".." }' >> Cargo.toml
119
+
120
+ - run : cd thttp && echo '[patch.crates-io]' >> Cargo.toml
121
+ - run : cd thttp && echo 'listenfd = { path = "../rust-listenfd" }' >> Cargo.toml
122
+
123
+ - run : cd thttp && systemfd --no-pid -s http::0.0.0.0:5052 -- cargo run &
124
+ - run : wget http://127.0.0.1:5052/Cargo.toml
125
+ - run : diff -u Cargo.toml Cargo.toml.1
126
+
8
127
async-io :
9
128
name : async-io ported to rustix
10
129
runs-on : ${{ matrix.os }}
@@ -774,7 +893,7 @@ jobs:
774
893
toolchain : ${{ matrix.rust }}
775
894
- uses : actions/checkout@v2
776
895
with :
777
- repository : cgwalters /cap-std-ext
896
+ repository : coreos /cap-std-ext
778
897
path : cap-std-ext
779
898
780
899
- name : Configure Cargo target
0 commit comments