name: CI permissions: contents: read on: pull_request: push: branches: - main - dev schedule: - cron: '0 1 * * *' workflow_dispatch: defaults: run: shell: bash jobs: tidy: uses: taiki-e/workflows/.github/workflows/tidy-no-rust.yml@main test: strategy: fail-fast: false matrix: os: - ubuntu-20.04 - ubuntu-22.04 tool: # cargo-watch is supported by cargo-binstall (through quickinstall) - cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,nextest,protoc,shellcheck,shfmt,valgrind,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch include: # Note: Specifying the version of valgrind and cargo-binstall is not supported. - os: ubuntu-20.04 tool: cargo-hack@0.5.24,cargo-llvm-cov@0.5.2,cargo-minimal-versions@0.1.8,parse-changelog@0.5.2,cargo-udeps@0.1.35,cargo-valgrind@2.1.0,cargo-deny@0.13.5,cross@0.2.4,nextest@0.9.11,protoc@3.21.12,shellcheck@0.9.0,shfmt@3.6.0,wasm-pack@0.10.3,wasmtime@3.0.1,mdbook@0.4.22,mdbook-linkcheck@0.7.7,cargo-watch@8.1.1 # Nextest supports basic version ranges as well. For other tools, this will be supported by https://github.com/taiki-e/install-action/pull/27. - os: ubuntu-20.04 tool: nextest@0.9 - os: macos-11 tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch - os: windows-2019 tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 with: persist-credentials: false - uses: ./ with: tool: ${{ matrix.tool }} test-container: strategy: fail-fast: false matrix: container: - ubuntu:20.04 # glibc 2.31 - debian:11-slim # glibc 2.31 tool: # valgrind: installing snap to container is difficult... - cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch include: - container: ubuntu:22.04 # glibc 2.35 # cargo-udeps depends on openssl 1.1 tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-valgrind,cargo-deny,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch - container: ubuntu:18.04 # glibc 2.27 # The latest mdbook provides prebuilt binaries for musl host, but we don't support it yet (will be done by https://github.com/taiki-e/install-action/pull/27) tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook-linkcheck,cargo-watch - container: debian:10-slim # glibc 2.28 # The latest mdbook provides prebuilt binaries for musl host, but we don't support it yet (will be done by https://github.com/taiki-e/install-action/pull/27) tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook-linkcheck,cargo-watch - container: fedora:latest # glibc 2.36 (as of fedora 37) # cargo-udeps depends on openssl 1.1 tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-valgrind,cargo-deny,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch - container: rockylinux:8 # glibc 2.28 # The latest mdbook provides prebuilt binaries for musl host, but we don't support it yet (will be done by https://github.com/taiki-e/install-action/pull/27) tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook-linkcheck,cargo-watch - container: rockylinux:8-minimal # glibc 2.28 # The latest mdbook provides prebuilt binaries for musl host, but we don't support it yet (will be done by https://github.com/taiki-e/install-action/pull/27) tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook-linkcheck,cargo-watch - container: centos:7 # glibc 2.17 # cargo-udeps,protoc,valgrind,wasmtime,mdbook-linkcheck,cargo-watch don't provide prebuilt binaries for musl host. # The latest mdbook provides prebuilt binaries for musl host, but we don't support it yet (will be done by https://github.com/taiki-e/install-action/pull/27) # we don't support nextest on very old glibc due to https://github.com/taiki-e/install-action/issues/13. tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-valgrind,cargo-deny,cross,shellcheck,shfmt,wasm-pack,cargo-binstall - container: alpine:latest # musl 1.2.3 (as of alpine 3.17) # cargo-udeps,protoc,valgrind,wasmtime,mdbook-linkcheck,cargo-watch don't provide prebuilt binaries for musl host. # The latest mdbook provides prebuilt binaries for musl host, but we don't support it yet (will be done by https://github.com/taiki-e/install-action/pull/27) tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cargo-valgrind,cargo-deny,cross,nextest,shellcheck,shfmt,wasm-pack,cargo-binstall runs-on: ubuntu-latest container: ${{ matrix.container }} steps: - name: Install requirements (ubuntu/debian) run: | set -ex apt-get -o Acquire::Retries=10 -qq update apt-get -o Acquire::Retries=10 -qq -o Dpkg::Use-Pty=0 install -y --no-install-recommends cargo if: startsWith(matrix.container, 'ubuntu') || startsWith(matrix.container, 'debian') - name: Install requirements (fedora/rockylinux) run: | set -ex dnf=dnf if ! type -P dnf &>/dev/null; then dnf=microdnf fi # tar and gzip are required for actions/checkout on rockylinux:*-minimal $dnf install -y cargo tar gzip if: startsWith(matrix.container, 'fedora') || startsWith(matrix.container, 'rockylinux') - name: Install requirements (centos) run: | set -ex curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable echo "$HOME/.cargo/bin" >>"${GITHUB_PATH}" if: startsWith(matrix.container, 'centos') - name: Install requirements (alpine) run: | set -ex apk add bash cargo shell: sh if: startsWith(matrix.container, 'alpine') - uses: actions/checkout@v3 with: persist-credentials: false - uses: ./ with: tool: ${{ matrix.tool }}