Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to '.github/workflows/build.yml')
| -rw-r--r-- | .github/workflows/build.yml | 78 |
1 files changed, 20 insertions, 58 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f9deeb9..3d47c208 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,68 +6,51 @@ on: - master merge_group: schedule: - - cron: "00 01 * * *" - -env: - MSRV: "1.82" - # This key can be changed to bust the cache of tree-sitter grammars. - GRAMMAR_CACHE_VERSION: "" + - cron: '00 01 * * *' jobs: check: name: Check (msrv) runs-on: ubuntu-latest - if: github.repository == 'helix-editor/helix' || github.event_name != 'schedule' steps: - name: Checkout sources - uses: actions/checkout@v5 - - - name: Install MSRV toolchain - uses: dtolnay/rust-toolchain@master + uses: actions/checkout@v4 + - name: Install stable toolchain + uses: helix-editor/rust-toolchain@v1 with: - toolchain: ${{ env.MSRV }} + profile: minimal + override: true - uses: Swatinem/rust-cache@v2 with: shared-key: "build" - - name: Cache tree-sitter grammars - uses: actions/cache@v4 - with: - path: runtime/grammars - key: ${{ runner.os }}-${{ runner.arch }}-stable-v${{ env.GRAMMAR_CACHE_VERSION }}-tree-sitter-grammars-${{ hashFiles('languages.toml') }} - restore-keys: ${{ runner.os }}-${{ runner.arch }}-stable-v${{ env.GRAMMAR_CACHE_VERSION }}-tree-sitter-grammars- - - name: Run cargo check run: cargo check test: name: Test Suite runs-on: ${{ matrix.os }} - if: github.repository == 'helix-editor/helix' || github.event_name != 'schedule' - timeout-minutes: 30 env: RUST_BACKTRACE: 1 HELIX_LOG_LEVEL: info steps: - name: Checkout sources - uses: actions/checkout@v5 + uses: actions/checkout@v4 - - name: Install MSRV toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.MSRV }} + - name: Install stable toolchain + uses: dtolnay/[email protected] - uses: Swatinem/rust-cache@v2 with: shared-key: "build" - - name: Cache tree-sitter grammars + - name: Cache test tree-sitter grammar uses: actions/cache@v4 with: path: runtime/grammars - key: ${{ runner.os }}-${{ runner.arch }}-stable-v${{ env.GRAMMAR_CACHE_VERSION }}-tree-sitter-grammars-${{ hashFiles('languages.toml') }} - restore-keys: ${{ runner.os }}-${{ runner.arch }}-stable-v${{ env.GRAMMAR_CACHE_VERSION }}-tree-sitter-grammars- + key: ${{ runner.os }}-stable-v${{ env.CACHE_VERSION }}-tree-sitter-grammars-${{ hashFiles('languages.toml') }} + restore-keys: ${{ runner.os }}-stable-v${{ env.CACHE_VERSION }}-tree-sitter-grammars- - name: Run cargo test run: cargo test --workspace @@ -77,33 +60,24 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-24.04-arm] + os: [ubuntu-latest, macos-latest, windows-latest] lints: name: Lints runs-on: ubuntu-latest - if: github.repository == 'helix-editor/helix' || github.event_name != 'schedule' steps: - name: Checkout sources - uses: actions/checkout@v5 + uses: actions/checkout@v4 - - name: Install MSRV toolchain - uses: dtolnay/rust-toolchain@master + - name: Install stable toolchain + uses: dtolnay/[email protected] with: - toolchain: ${{ env.MSRV }} components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 with: shared-key: "build" - - name: Cache tree-sitter grammars - uses: actions/cache@v4 - with: - path: runtime/grammars - key: ${{ runner.os }}-${{ runner.arch }}-stable-v${{ env.GRAMMAR_CACHE_VERSION }}-tree-sitter-grammars-${{ hashFiles('languages.toml') }} - restore-keys: ${{ runner.os }}-${{ runner.arch }}-stable-v${{ env.GRAMMAR_CACHE_VERSION }}-tree-sitter-grammars- - - name: Run cargo fmt run: cargo fmt --all --check @@ -118,33 +92,20 @@ jobs: docs: name: Docs runs-on: ubuntu-latest - if: github.repository == 'helix-editor/helix' || github.event_name != 'schedule' steps: - name: Checkout sources - uses: actions/checkout@v5 + uses: actions/checkout@v4 - - name: Install MSRV toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.MSRV }} + - name: Install stable toolchain + uses: dtolnay/[email protected] - uses: Swatinem/rust-cache@v2 with: shared-key: "build" - - name: Cache tree-sitter grammars - uses: actions/cache@v4 - with: - path: runtime/grammars - key: ${{ runner.os }}-${{ runner.arch }}-stable-v${{ env.GRAMMAR_CACHE_VERSION }}-tree-sitter-grammars-${{ hashFiles('languages.toml') }} - restore-keys: ${{ runner.os }}-${{ runner.arch }}-stable-v${{ env.GRAMMAR_CACHE_VERSION }}-tree-sitter-grammars- - - name: Validate queries run: cargo xtask query-check - - name: Validate themes - run: cargo xtask theme-check - - name: Generate docs run: cargo xtask docgen @@ -154,3 +115,4 @@ jobs: git diff-files --quiet \ || (echo "Run 'cargo xtask docgen', commit the changes and push again" \ && exit 1) + |