Skip to content

CI

CI #924

Workflow file for this run

name: CI
permissions:
contents: read
on:
pull_request:
push:
branches:
- main
- dev
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTDOCFLAGS: -D warnings
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
tidy:
uses: taiki-e/workflows/.github/workflows/tidy.yml@main
test:
needs: tidy
strategy:
fail-fast: false
matrix:
# https://github.com/taiki-e/rust-cross-toolchain/blob/HEAD/tools/target-list-shared.sh
target:
# Linux (GNU)
# rustup target list | grep -e '-linux-gnu'
# rustc --print target-list | grep -e '-linux-gnu'
- aarch64-unknown-linux-gnu
# - aarch64-unknown-linux-gnu_ilp32 # tier3
- aarch64_be-unknown-linux-gnu # tier3
# - aarch64_be-unknown-linux-gnu_ilp32 # tier3
- arm-unknown-linux-gnueabi
# - arm-unknown-linux-gnueabihf # supported in rust-cross-toolchain but not ported to this action
- armeb-unknown-linux-gnueabi # tier3
# - armv4t-unknown-linux-gnueabi # tier3, rustc generate code for armv5t (probably needs to pass +v4t to llvm)
- armv5te-unknown-linux-gnueabi
- armv7-unknown-linux-gnueabi
- armv7-unknown-linux-gnueabihf
- i586-unknown-linux-gnu
- i686-unknown-linux-gnu
- loongarch64-unknown-linux-gnu
# - m68k-unknown-linux-gnu # tier3, build fail: https://github.com/rust-lang/rust/issues/89498
- mips-unknown-linux-gnu
- mips64-unknown-linux-gnuabi64
- mips64el-unknown-linux-gnuabi64
- mipsel-unknown-linux-gnu
# TODO: https://github.com/rust-lang/rust/pull/112374 broke build-std due to https://github.com/rust-lang/libc/pull/3268 is not released yet
# - mipsisa32r6-unknown-linux-gnu # tier3
# - mipsisa32r6el-unknown-linux-gnu # tier3
# - mipsisa64r6-unknown-linux-gnuabi64 # tier3
# - mipsisa64r6el-unknown-linux-gnuabi64 # tier3
- powerpc-unknown-linux-gnu
# - powerpc-unknown-linux-gnuspe # tier3, fails to run test, and GCC 9 removed support for this target
- powerpc64-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- riscv32gc-unknown-linux-gnu # tier3
- riscv64gc-unknown-linux-gnu
- s390x-unknown-linux-gnu
# - sparc-unknown-linux-gnu # tier3, supported in rust-cross-toolchain but not ported to this action
- sparc64-unknown-linux-gnu
- thumbv7neon-unknown-linux-gnueabihf
- x86_64-unknown-linux-gnu
# - x86_64-unknown-linux-gnux32 # tier3, run-fail
os:
- ubuntu-22.04
- ubuntu-20.04
include:
# Linux (musl)
# rustup target list | grep -e '-linux-musl'
# rustc --print target-list | grep -e '-linux-musl'
- target: aarch64-unknown-linux-musl
- target: aarch64-unknown-linux-musl
runner: qemu-user@7.2
- target: aarch64-unknown-linux-musl
qemu: '7.2'
- target: arm-unknown-linux-musleabi
- target: arm-unknown-linux-musleabihf
- target: armv5te-unknown-linux-musleabi
- target: armv7-unknown-linux-musleabi
- target: armv7-unknown-linux-musleabihf
# - target: hexagon-unknown-linux-musl # tier3
- target: i586-unknown-linux-musl
- target: i686-unknown-linux-musl
- target: mips-unknown-linux-musl
# - target: mips64-openwrt-linux-musl # tier3
- target: mips64-unknown-linux-muslabi64
- target: mips64el-unknown-linux-muslabi64
- target: mipsel-unknown-linux-musl
# - target: powerpc-unknown-linux-musl # tier3
# - target: powerpc64-unknown-linux-musl # tier3
# - target: powerpc64le-unknown-linux-musl # tier3
# - target: riscv32gc-unknown-linux-musl # tier3
# - target: riscv64gc-unknown-linux-musl # tier3
# - target: s390x-unknown-linux-musl # tier3
# - target: thumbv7neon-unknown-linux-musleabihf # tier3
- target: x86_64-unknown-linux-musl
# Linux (uClibc)
# rustc --print target-list | grep -e '-linux-uclibc'
- target: armv5te-unknown-linux-uclibceabi # tier3
- target: armv7-unknown-linux-uclibceabi # tier3
- target: armv7-unknown-linux-uclibceabihf # tier3
- target: mips-unknown-linux-uclibc # tier3
- target: mipsel-unknown-linux-uclibc # tier3
# Android
# rustup target list | grep -e '-android'
# rustc --print target-list | grep -e '-android'
- target: aarch64-linux-android
- target: arm-linux-androideabi
- target: arm-linux-androideabi@21
- target: armv7-linux-androideabi
- target: i686-linux-android
- target: thumbv7neon-linux-androideabi
- target: x86_64-linux-android
# FreeBSD
# rustup target list | grep -e '-freebsd'
# rustc --print target-list | grep -e '-freebsd'
- target: aarch64-unknown-freebsd # tier3
# - target: armv6-unknown-freebsd # tier3
# - target: armv7-unknown-freebsd # tier3
- target: i686-unknown-freebsd
# - target: powerpc-unknown-freebsd # tier3
# - target: powerpc64-unknown-freebsd # tier3
# - target: powerpc64le-unknown-freebsd # tier3
# - target: riscv64gc-unknown-freebsd # tier3
- target: x86_64-unknown-freebsd
- target: x86_64-unknown-freebsd@13
# NetBSD
# rustup target list | grep -e '-netbsd'
# rustc --print target-list | grep -e '-netbsd'
- target: aarch64-unknown-netbsd # tier3
# - target: aarch64_be-unknown-netbsd # tier3
# - target: armv6-unknown-netbsd-eabihf # tier3
# - target: armv7-unknown-netbsd-eabihf # tier3
# - target: i686-unknown-netbsd # tier3
# - target: powerpc-unknown-netbsd # tier3
# - target: riscv64gc-unknown-netbsd # tier3
# - target: sparc64-unknown-netbsd # tier3
- target: x86_64-unknown-netbsd
- target: x86_64-unknown-netbsd@9
# WASI
# rustup target list | grep -e '-wasi'
# rustc --print target-list | grep -e '-wasi'
- target: wasm32-wasi
# macOS
# rustup target list | grep -e '-darwin'
# rustc --print target-list | grep -e '-darwin'
- target: aarch64-apple-darwin
os: macos-latest
# - target: i686-apple-darwin # tier3
# os: macos-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64h-apple-darwin # tier3
os: macos-latest
# Windows (MSVC)
# rustup target list | grep -e '-pc-windows-msvc'
# rustc --print target-list | grep -e '-pc-windows-msvc'
- { target: aarch64-pc-windows-msvc, os: windows-latest }
- { target: i586-pc-windows-msvc, os: windows-latest }
- { target: i686-pc-windows-msvc, os: windows-latest }
# - { target: thumbv7a-pc-windows-msvc, os: windows-latest } # tier3
- { target: x86_64-pc-windows-msvc, os: windows-latest }
# Windows (MinGW)
# rustup target list | grep -e '-pc-windows-gnu'
# rustc --print target-list | grep -e '-pc-windows-gnu'
# Windows host:
# - target: i686-pc-windows-gnu
# os: windows-latest
- target: x86_64-pc-windows-gnu
os: windows-latest
# Linux host:
# - target: i686-pc-windows-gnu
- target: x86_64-pc-windows-gnu
- target: x86_64-pc-windows-gnu
runner: wine@7.13
- target: x86_64-pc-windows-gnu
wine: '7.0.1'
- target: x86_64-pc-windows-gnullvm
- target: aarch64-pc-windows-gnullvm
# prettier-ignore
exclude:
# Linker error "unsupported ISA subset `z'" since nightly-2023-08-09 (LLVM 17)
- { target: riscv64gc-unknown-linux-gnu, os: ubuntu-20.04 }
# Segmentation fault on ubuntu 20.04: https://github.com/taiki-e/setup-cross-toolchain-action/issues/1
- { target: aarch64_be-unknown-linux-gnu, os: ubuntu-20.04 }
- { target: armeb-unknown-linux-gnueabi, os: ubuntu-20.04 }
- { target: mips-unknown-linux-gnu, os: ubuntu-20.04 }
- { target: mips64-unknown-linux-gnuabi64, os: ubuntu-20.04 }
- { target: mipsisa32r6-unknown-linux-gnu, os: ubuntu-20.04 }
- { target: mipsisa64r6-unknown-linux-gnuabi64, os: ubuntu-20.04 }
- { target: powerpc64-unknown-linux-gnu, os: ubuntu-20.04 }
- { target: sparc64-unknown-linux-gnu, os: ubuntu-20.04 }
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install Rust
run: rustup toolchain add nightly --no-self-update && rustup default nightly
- run: echo "QEMU_STRACE=1" >>"${GITHUB_ENV}"
if: matrix.target != 'aarch64-pc-windows-gnullvm'
- uses: ./
with:
target: ${{ matrix.target }}
runner: ${{ matrix.runner }}
qemu: ${{ matrix.qemu }}
wine: ${{ matrix.wine }}
- run: git clone https://github.com/taiki-e/rust-cross-toolchain.git
- run: tools/ci/test.sh ${{ matrix.target }} rust-cross-toolchain/docker/test/fixtures/rust
id: test
# For debugging
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}-${{ matrix.os }}
# TODO(windows host): No files were found with the provided path: /tmp/artifacts/. No artifacts will be uploaded.
path: /tmp/artifacts/