no more 7.4 in CI #690
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: Build | |
on: | |
push: | |
branches: [ "main", "feature-*" ] | |
pull_request: | |
branches: [ "main", "feature-*" ] | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
# default version is also used in the semver check step | |
- setup: varnish76 | |
type: latest | |
- setup: varnish75 | |
- setup: varnish60lts | |
env: | |
RUST_BACKTRACE: 1 | |
RUSTDOCFLAGS: -D warnings | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: taiki-e/install-action@v2 | |
with: { tool: just } | |
- uses: actions/checkout@v4 | |
- name: Ensure this crate has not yet been published (on release) | |
if: github.event_name == 'release' && matrix.type == 'latest' | |
run: just check-if-published | |
- uses: Swatinem/rust-cache@v2 | |
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch' | |
- name: install varnish-dev | |
run: | | |
# These steps should be the same as in the Dockerfile | |
set -ex | |
curl -sSf "https://packagecloud.io/install/repositories/varnishcache/${{ matrix.setup }}/script.deb.sh" | sudo bash | |
echo -e 'Package: varnish varnish-dev\nPin: origin "packagecloud.io"\nPin-Priority: 1001' | sudo tee /etc/apt/preferences.d/varnish | |
cat /etc/apt/preferences.d/varnish | |
sudo apt-cache policy varnish | |
sudo apt-get install -y varnish varnish-dev | |
- run: just -v ci-test | |
- name: Test for latest Varnish version | |
if: matrix.type == 'latest' | |
run: just ci-test-extras | |
- name: Check semver | |
if: matrix.type == 'latest' | |
uses: obi1kenobi/cargo-semver-checks-action@v2 | |
with: | |
exclude: varnish-sys # GitHub CI has somehow generates a different output | |
- name: Test packaging for publish | |
if: matrix.type == 'latest' | |
run: | | |
rustup install nightly --profile minimal | |
just test-publish | |
msrv: | |
name: Test MSRV | |
runs-on: ubuntu-latest | |
env: | |
RUST_BACKTRACE: 1 | |
RUSTDOCFLAGS: -D warnings | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: taiki-e/install-action@v2 | |
with: { tool: just } | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch' | |
- name: Read crate metadata | |
id: metadata | |
run: echo "rust-version=$(sed -ne 's/rust-version *= *\"\(.*\)\"/\1/p' Cargo.toml)" >> $GITHUB_OUTPUT | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ steps.metadata.outputs.rust-version }} | |
components: rustfmt | |
- name: install varnish-dev | |
run: | | |
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish76/script.deb.sh | sudo bash | |
sudo apt-get install -y varnish-dev | |
- run: just -v ci-test-msrv | |
# Ensure that the docs can be built at docs.rs without varnish dependencies | |
test-docs-rs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: rust-info | |
run: rustc --version && cargo --version | |
- uses: Swatinem/rust-cache@v2 | |
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch' | |
- name: Ensure docs can be built at docs.rs without varnish dependencies | |
run: cargo doc --no-deps | |
env: | |
# Pretend to be on docs.rs | |
# See https://docs.rs/about/builds#detecting-docsrs | |
DOCS_RS: 1 |