CI #3861
Workflow file for this run
This file contains hidden or 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 | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: '0 2 * * *' | |
| 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 --noprofile --norc -CeEuxo pipefail {0} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-external-types: | |
| uses: taiki-e/github-actions/.github/workflows/check-external-types.yml@main | |
| clippy: | |
| uses: taiki-e/github-actions/.github/workflows/clippy.yml@main | |
| with: | |
| fuzzy_provenance_casts: false # TODO | |
| docs: | |
| uses: taiki-e/github-actions/.github/workflows/docs.yml@main | |
| # Test crates on their minimum Rust versions and nightly Rust. | |
| test: | |
| env: | |
| RUST_VERSION: ${{ matrix.rust }} | |
| RUST_TARGET: ${{ matrix.target }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - rust: '1.74' | |
| os: ubuntu-latest | |
| - rust: '1.74' | |
| os: ubuntu-24.04-arm | |
| - rust: '1.74' | |
| os: windows-latest | |
| - rust: stable | |
| os: ubuntu-latest | |
| - rust: stable | |
| os: ubuntu-24.04-arm | |
| - rust: stable | |
| os: windows-latest | |
| - rust: nightly | |
| os: ubuntu-latest | |
| - rust: nightly | |
| os: ubuntu-24.04-arm | |
| - rust: nightly | |
| os: macos-latest | |
| - rust: nightly | |
| os: windows-latest | |
| - rust: nightly | |
| os: ubuntu-latest | |
| target: i686-unknown-linux-gnu | |
| - rust: nightly | |
| os: ubuntu-24.04-arm | |
| target: armv7-unknown-linux-gnueabihf | |
| - rust: nightly | |
| os: ubuntu-latest | |
| target: powerpc64le-unknown-linux-gnu | |
| - rust: nightly | |
| os: ubuntu-latest | |
| target: s390x-unknown-linux-gnu | |
| # Test 32-bit target that does not have AtomicU64/AtomicI64. | |
| - rust: nightly | |
| os: ubuntu-latest | |
| target: armv5te-unknown-linux-gnueabi | |
| # Test target without stable inline asm support. | |
| - rust: stable | |
| os: ubuntu-latest | |
| target: sparc64-unknown-linux-gnu | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: taiki-e/checkout-action@v1 | |
| - name: Install Rust | |
| uses: taiki-e/github-actions/install-rust@main | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - uses: taiki-e/setup-cross-toolchain-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| if: matrix.target != '' | |
| - run: | | |
| echo "RUSTFLAGS=${RUSTFLAGS} --cfg gha_macos_runner" >>"${GITHUB_ENV}" | |
| echo "RUSTDOCFLAGS=${RUSTDOCFLAGS} --cfg gha_macos_runner" >>"${GITHUB_ENV}" | |
| if: startsWith(matrix.os, 'macos') | |
| - name: Test | |
| run: ci/test.sh | |
| # Check all feature combinations works properly. | |
| features: | |
| env: | |
| RUST_VERSION: ${{ matrix.rust }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: | |
| - msrv | |
| - nightly | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: taiki-e/checkout-action@v1 | |
| - name: Install Rust | |
| uses: taiki-e/github-actions/install-rust@main | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| if: matrix.rust != 'msrv' | |
| - name: Install cargo-hack | |
| uses: taiki-e/install-action@cargo-hack | |
| - name: Check features | |
| run: ci/check-features.sh | |
| # Check for duplicate dependencies. | |
| dependencies: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: taiki-e/checkout-action@v1 | |
| - name: Install Rust | |
| uses: taiki-e/github-actions/install-rust@nightly | |
| - name: Install cargo-hack | |
| uses: taiki-e/install-action@cargo-hack | |
| - name: Install cargo-minimal-versions | |
| uses: taiki-e/install-action@cargo-minimal-versions | |
| - name: dependency tree check | |
| run: ci/dependencies.sh | |
| # When this job failed, run ci/no_atomic.sh and commit result changes. | |
| codegen: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: taiki-e/checkout-action@v1 | |
| - name: Install Rust | |
| uses: taiki-e/github-actions/install-rust@stable | |
| - run: ci/no_atomic.sh | |
| - run: git add -N . && git diff --exit-code | |
| if: github.repository_owner != 'crossbeam-rs' || github.event_name != 'schedule' | |
| - id: diff | |
| run: | | |
| git config user.name "Taiki Endo" | |
| git config user.email "te316e89@gmail.com" | |
| git add -N . | |
| if ! git diff --exit-code; then | |
| git add . | |
| git commit -m "Update no_atomic.rs" | |
| echo 'success=false' >>"${GITHUB_OUTPUT}" | |
| fi | |
| if: github.repository_owner == 'crossbeam-rs' && github.event_name == 'schedule' | |
| - uses: peter-evans/create-pull-request@v8 | |
| with: | |
| title: Update no_atomic.rs | |
| body: | | |
| Auto-generated by [create-pull-request][1] | |
| [Please close and immediately reopen this pull request to run CI.][2] | |
| [1]: https://github.com/peter-evans/create-pull-request | |
| [2]: https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs | |
| branch: update-no-atomic-rs | |
| if: github.repository_owner == 'crossbeam-rs' && github.event_name == 'schedule' && steps.diff.outputs.success == 'false' | |
| # Check formatting. | |
| fmt: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: taiki-e/checkout-action@v1 | |
| - name: Install Rust | |
| uses: taiki-e/github-actions/install-rust@nightly | |
| with: | |
| component: rustfmt | |
| - name: Install shfmt | |
| uses: taiki-e/install-action@shfmt | |
| # `cargo fmt` cannot recognize files not included in the current workspace and modules | |
| # defined inside macros, so run rustfmt directly. | |
| # We need to use nightly rustfmt because we use the unstable formatting options of rustfmt. | |
| - run: rustfmt --check $(git ls-files '*.rs') | |
| - run: shfmt -d $(git ls-files '*.sh') | |
| - run: RUST_LOG=warn npx -y @taplo/cli fmt --check $(git ls-files '*.toml') | |
| # Run miri. | |
| miri: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| group: | |
| - channel | |
| - others | |
| miriflags: | |
| - '' | |
| - '-Zmiri-tree-borrows' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: taiki-e/checkout-action@v1 | |
| - name: Install Rust | |
| uses: taiki-e/github-actions/install-rust@nightly | |
| with: | |
| component: miri | |
| - name: miri | |
| run: ci/miri.sh ${{ matrix.group }} | |
| env: | |
| MIRIFLAGS: ${{ matrix.miriflags }} | |
| # Run cargo-careful. | |
| careful: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: taiki-e/checkout-action@v1 | |
| - name: Install Rust | |
| uses: taiki-e/github-actions/install-rust@nightly | |
| with: | |
| component: rust-src | |
| - uses: taiki-e/install-action@cargo-careful | |
| - name: Run cargo-careful | |
| run: ci/careful.sh | |
| # Run sanitizers. | |
| san: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: taiki-e/checkout-action@v1 | |
| - name: Install Rust | |
| uses: taiki-e/github-actions/install-rust@nightly | |
| with: | |
| component: rust-src | |
| target: x86_64-unknown-linux-gnuasan | |
| - name: Run sanitizers | |
| run: ci/san.sh | |
| # Run loom tests. | |
| loom: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: taiki-e/checkout-action@v1 | |
| - name: Install Rust | |
| uses: taiki-e/github-actions/install-rust@stable | |
| - name: loom | |
| run: ci/crossbeam-epoch-loom.sh | |
| shellcheck: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: taiki-e/checkout-action@v1 | |
| - name: Install shellcheck | |
| uses: taiki-e/install-action@shellcheck | |
| - run: shellcheck $(git ls-files '*.sh') |