build: bump insta from 1.34.0 to 1.38.0 #2887
Workflow file for this run
This file contains 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: Linux | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
CARGO_INCREMENTAL: 0 | |
RUST_BACKTRACE: short | |
jobs: | |
build-git: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Use a tag from https://github.com/git/git/tags | |
# Make sure to update `git-version` in the `run-tests` step as well. | |
git-version: ["v2.24.3", "v2.29.2", "v2.33.1", "v2.37.3"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: git/git | |
ref: ${{ matrix.git-version }} | |
- uses: actions/cache@v4 | |
id: cache-git-build | |
with: | |
key: ${{ runner.os }}-git-${{ matrix.git-version }} | |
path: | | |
git | |
git-* | |
- name: Build Git ${{ matrix.git-version }} | |
if: steps.cache-git-build.outputs.cache-hit != 'true' | |
run: | | |
sudo apt-get update --fix-missing | |
# List of dependencies from https://git-scm.com/book/en/v2/Getting-Started-Installing-Git | |
sudo apt-get install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev | |
make | |
- name: Package Git | |
run: tar -czf git.tar.gz git git-* | |
- name: "Upload artifact: git" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: git-${{ matrix.git-version }} | |
path: git.tar.gz | |
if-no-files-found: error | |
run-tests: | |
runs-on: ubuntu-latest | |
needs: build-git | |
strategy: | |
matrix: | |
git-version: ["v2.24.3", "v2.29.2", "v2.33.1", "v2.37.3"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Download artifact: git" | |
uses: actions/download-artifact@v4 | |
with: | |
name: git-${{ matrix.git-version }} | |
- name: "Unpack artifact: git" | |
run: tar -xf git.tar.gz | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.67.0 | |
override: true | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 | |
- name: Compile (all features) | |
run: cargo build --all-features --all-targets --workspace | |
# Don't test benches. | |
- name: Run Rust tests (all features) | |
timeout-minutes: 30 | |
run: | | |
export TEST_GIT="$PWD"/git | |
export TEST_GIT_EXEC_PATH=$(dirname "$TEST_GIT") | |
cargo test --all-features --examples --tests --workspace | |
# Note that `--doc` can't be combined with other tests. | |
- name: Run Rust doc-tests (all features) | |
timeout-minutes: 30 | |
run: | | |
export TEST_GIT="$PWD"/git | |
export TEST_GIT_EXEC_PATH=$(dirname "$TEST_GIT") | |
cargo test --all-features --doc --workspace | |
- name: Compile (no features) | |
run: cargo build --no-default-features --all-targets --workspace | |
- name: Run Rust tests (no default features) | |
timeout-minutes: 30 | |
run: | | |
export TEST_GIT="$PWD"/git | |
export TEST_GIT_EXEC_PATH=$(dirname "$TEST_GIT") | |
cargo test --no-default-features --examples --tests --workspace |