Unvendor tree-sitter-perl #9
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
| on: [push, pull_request] | |
| name: Test | |
| jobs: | |
| build: | |
| name: Test ${{ matrix.job.target }} | |
| runs-on: ${{ matrix.job.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| job: | |
| # Operating systems available: https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories | |
| - { target: x86_64-unknown-linux-gnu, os: ubuntu-22.04 } | |
| - { target: x86_64-pc-windows-msvc, os: windows-latest } | |
| - { target: aarch64-pc-windows-msvc, os: windows-11-arm } | |
| - { target: aarch64-unknown-linux-gnu, os: ubuntu-22.04, use-cross: true } | |
| # mac-14 is an M1 ARM device. | |
| - { target: aarch64-apple-darwin, os: macos-14 } | |
| - { target: x86_64-apple-darwin, os: macos-14, use-cross: true } | |
| - { target: x86_64-unknown-linux-musl, os: ubuntu-22.04, use-cross: true } | |
| env: | |
| BUILD_CMD: cargo | |
| steps: | |
| - name: Checkout source code | |
| # v4.2.2 | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.76.0 | |
| with: | |
| targets: ${{ matrix.job.target }} | |
| - name: Install cross | |
| if: matrix.job.use-cross | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cross@0.2.5 | |
| - name: Overwrite build command env variable | |
| if: matrix.job.use-cross | |
| shell: bash | |
| run: echo "BUILD_CMD=cross" >> $GITHUB_ENV | |
| - name: Test | |
| shell: bash | |
| run: $BUILD_CMD test --target ${{ matrix.job.target }} | |
| test_mime_db: | |
| name: Test with MIME database | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| # v4.2.2 | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - uses: dtolnay/rust-toolchain@1.76.0 | |
| # This runs tests that rely on the MIME database being present. | |
| - run: cargo test -- --ignored | |
| test_linux_latest_stable: | |
| name: Test Linux (latest stable Rust) | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| # v4.2.2 | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - run: cargo +stable test | |
| regression_test: | |
| name: Output Regression Test | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| # v4.2.2 | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - uses: dtolnay/rust-toolchain@1.76.0 | |
| - name: Generate output for all sample files | |
| run: ./sample_files/compare_all.sh | |
| - name: Verify output is unchanged | |
| run: diff -C2 sample_files/compare.result sample_files/compare.expected | |
| package: | |
| name: Check Linux Packaging | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| # v4.2.2 | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - uses: dtolnay/rust-toolchain@1.76.0 | |
| - run: cargo package --allow-dirty | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| # v4.2.2 | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - uses: dtolnay/rust-toolchain@1.76.0 | |
| - run: cargo fmt --all -- --check | |
| actionlint: | |
| name: Actionlint | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| # v4.2.2 | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - uses: raven-actions/actionlint@v2 | |
| with: | |
| shellcheck: false | |
| typo-check: | |
| name: Typo Check | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 10 | |
| env: | |
| FORCE_COLOR: 1 | |
| TYPOS_VERSION: v1.38.1 | |
| steps: | |
| # v4.2.2 | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - name: Download typos | |
| run: curl -LsSf https://github.com/crate-ci/typos/releases/download/$TYPOS_VERSION/typos-$TYPOS_VERSION-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | |
| - name: Check for typos | |
| run: typos | |