Fix tcgetpgrp
and tcsetpgrp
on Linux.
#3541
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
env: | |
QEMU_BUILD_VERSION: 8.1.0 | |
# Enabling testing of experimental features. | |
RUSTFLAGS: --cfg rustix_use_experimental_features | |
strategy: | |
matrix: | |
build: [ubuntu, ubuntu-20.04, i686-linux, ubuntu-stable, i686-linux-stable, ubuntu-1.63, i686-linux-1.63, macos-latest, macos-11, windows, windows-2019] | |
include: | |
- build: ubuntu | |
os: ubuntu-latest | |
rust: nightly | |
- build: ubuntu-20.04 | |
os: ubuntu-20.04 | |
rust: nightly | |
- build: i686-linux | |
os: ubuntu-latest | |
rust: nightly | |
target: i686-unknown-linux-gnu | |
gcc_package: gcc-i686-linux-gnu | |
gcc: i686-linux-gnu-gcc | |
libc_package: libc-dev-i386-cross | |
- build: ubuntu-stable | |
os: ubuntu-latest | |
rust: stable | |
- build: i686-linux-stable | |
os: ubuntu-latest | |
rust: stable | |
target: i686-unknown-linux-gnu | |
gcc_package: gcc-i686-linux-gnu | |
gcc: i686-linux-gnu-gcc | |
libc_package: libc-dev-i386-cross | |
- build: ubuntu-1.63 | |
os: ubuntu-latest | |
rust: 1.63 | |
- build: i686-linux-1.63 | |
os: ubuntu-latest | |
rust: 1.63 | |
target: i686-unknown-linux-gnu | |
gcc_package: gcc-i686-linux-gnu | |
gcc: i686-linux-gnu-gcc | |
libc_package: libc-dev-i386-cross | |
- build: macos-latest | |
os: macos-latest | |
rust: stable | |
- build: macos-11 | |
os: macos-11 | |
rust: stable | |
- build: windows | |
os: windows-latest | |
rust: nightly | |
- build: windows-2019 | |
os: windows-2019 | |
rust: nightly | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: ./.github/actions/install-rust | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Configure Cargo target | |
run: | | |
echo CARGO_BUILD_TARGET=${{ matrix.target }} >> $GITHUB_ENV | |
rustup target add ${{ matrix.target }} | |
if: matrix.target != '' | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ runner.tool_cache }}/qemu | |
key: qemu-${{ matrix.target }}-${{ env.QEMU_BUILD_VERSION }}-patched | |
if: matrix.target != '' && matrix.os == 'ubuntu-latest' | |
- name: Install cross-compilation tools | |
run: | | |
set -ex | |
sudo apt-get update | |
sudo apt-get install -y ${{ matrix.gcc_package }} ninja-build | |
upcase=$(echo ${{ matrix.target }} | awk '{ print toupper($0) }' | sed 's/-/_/g') | |
echo CARGO_TARGET_${upcase}_LINKER=${{ matrix.gcc }} >> $GITHUB_ENV | |
if: matrix.gcc_package != '' && matrix.os == 'ubuntu-latest' | |
- name: Install cross-compilation libraries | |
run: | | |
set -ex | |
sudo apt-get update | |
sudo apt-get install -y ${{ matrix.libc_package }} | |
if: matrix.libc_package != '' && matrix.os == 'ubuntu-latest' | |
- name: Install qemu | |
run: | | |
set -ex | |
upcase=$(echo ${{ matrix.target }} | awk '{ print toupper($0) }' | sed 's/-/_/g') | |
echo CARGO_TARGET_${upcase}_RUNNER=${{ runner.tool_cache }}/qemu/bin/${{ matrix.qemu }} ${{ matrix.qemu_args }} >> $GITHUB_ENV | |
# See if qemu is already in the cache | |
if [ -f ${{ runner.tool_cache }}/qemu/bin/${{ matrix.qemu }} ]; then | |
exit 0 | |
fi | |
# Download and build qemu from source since the most recent release is | |
# way faster at arm emulation than the current version github actions' | |
# ubuntu image uses. Disable as much as we can to get it to build | |
# quickly. | |
cd | |
curl https://download.qemu.org/qemu-$QEMU_BUILD_VERSION.tar.xz | tar xJf - | |
cd qemu-$QEMU_BUILD_VERSION | |
patch -p1 < $GITHUB_WORKSPACE/ci/translate-errno.patch | |
patch -p1 < $GITHUB_WORKSPACE/ci/getsockopt-timeouts.patch | |
patch -p1 < $GITHUB_WORKSPACE/ci/s390x-stat-have-nsec.patch | |
patch -p1 < $GITHUB_WORKSPACE/ci/aarch64-o-largefile.patch | |
patch -p1 < $GITHUB_WORKSPACE/ci/tcgets2-tcsets2.patch | |
patch -p1 < $GITHUB_WORKSPACE/ci/more-sockopts.patch | |
./configure --target-list=${{ matrix.qemu_target }} --prefix=${{ runner.tool_cache }}/qemu --disable-tools --disable-slirp --disable-fdt --disable-capstone --disable-docs | |
ninja -C build install | |
if: matrix.qemu != '' && matrix.os == 'ubuntu-latest' | |
- name: Use specific dependency versions for Rust 1.63 compatibility. | |
if: matrix.rust == '1.63' | |
run: | | |
cargo update --package=dashmap --precise 5.4.0 | |
cargo update --package=regex --precise=1.9.0 | |
- run: | | |
cargo test --verbose --features=all-apis --release --workspace -- --nocapture | |
env: | |
RUST_BACKTRACE: full | |
MACOSX_DEPLOYMENT_TARGET: 10.7 | |
MACOSX_SDK_VERSION: 10.7 | |