Skip to content

Commit

Permalink
chore(ci) improve caching steps and ignore some files
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultcha committed Aug 24, 2023
1 parent 5594197 commit 0e40da2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ name: CI
on:
push:
branches: main
paths-ignore:
- '**/*.md'
- '**/release.yml'
- '**/ci-large.yml'
pull_request:
branches: '**'
paths-ignore:
- '**/*.md'
- '**/release.yml'
- '**/ci-large.yml'
workflow_dispatch:

defaults:
Expand Down Expand Up @@ -118,7 +126,8 @@ jobs:
coverage: true
secrets: inherit

coverage:
coveralls:
name: 'Coveralls'
needs: unit
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -192,15 +201,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Setup cache - rustup toolchain'
uses: actions/cache@v3
if: ${{ !env.ACT }}
with:
path: |
~/.rustup/settings.toml
~/.rustup/toolchains/*
~/.rustup/update-hashes/*
key: rust-toolchain-${{ runner.os }}-${{ hashFiles('.github/**/*.yml', '.github/**/*.sh', 'rust-toolchain') }}
- uses: actions-rs/toolchain@v1
with:
components: clippy
- uses: actions/cache@v3
- name: 'Setup cache - work/ dir'
uses: actions/cache@v3
if: ${{ !env.ACT }}
with:
path: |
work/downloads
key: lint-${{ runner.os }}-${{ hashFiles('util/**/*.sh', 'util/**/*.pl', 'util/**/*.awk', '.github/**/*.yml', '.github/**/*.sh', '.github/**/*.js', 'rust-toolchain') }}
work/openssl
key: lint-${{ runner.os }}-${{ hashFiles('util/**/*.sh', 'util/**/*.pl', 'util/**/*.awk', '.github/**/*.yml', '.github/**/*.sh', '.github/**/*.js', 'rust-toolchain', 'Makefile') }}
- run: make setup
- run: make lint
- uses: actions-rs/clippy-check@v1
Expand Down Expand Up @@ -249,7 +269,7 @@ jobs:
debug: ${{ matrix.debug }}

build:
name: 'Test builds'
name: 'Build'
#if: ${{ false }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
Expand Down Expand Up @@ -281,7 +301,7 @@ jobs:
work/downloads
work/runtimes
work/openssl
key: work-${{ runner.os }}-${{ matrix.cc }}-${{ matrix.ngx }}-${{ matrix.openresty }}-${{ matrix.runtime }}-${{ hashFiles('util/**/*.sh', 'util/**/*.pl', 'util/**/*.awk', '.github/**/*.yml', '.github/**/*.sh', '.github/**/*.js', 'rust-toolchain') }}
key: work-${{ runner.os }}-${{ matrix.cc }}-${{ matrix.ngx }}-${{ matrix.openresty }}-${{ matrix.runtime }}-${{ hashFiles('util/**/*.sh', 'util/**/*.pl', 'util/**/*.awk', '.github/**/*.yml', '.github/**/*.sh', '.github/**/*.js', 'rust-toolchain', 'Makefile') }}
- name: Setup Wasm runtime
run: ./util/runtime.sh -R ${{ matrix.runtime }} -V ${{ matrix[matrix.runtime] }}
- run: make setup
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/job-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
~/.rustup/settings.toml
~/.rustup/toolchains/*
~/.rustup/update-hashes/*
key: rust-toolchain-${{ runner.os }}-${{ hashFiles('.github/**/*.yml', '.github/**/*.sh') }}
key: rust-toolchain-${{ inputs.os }}-${{ hashFiles('.github/**/*.yml', '.github/**/*.sh', 'rust-toolchain') }}
- name: 'Setup cache - work/ dir'
uses: actions/cache@v3
if: ${{ !env.ACT }}
Expand All @@ -89,7 +89,7 @@ jobs:
work/downloads
work/runtimes
work/openssl
key: work-${{ runner.os }}-${{ inputs.cc }}-${{ inputs.ngx }}-${{ inputs.openresty }}-${{ inputs.runtime }}-${{ hashFiles('util/**/*.sh', 'util/**/*.pl', 'util/**/*.awk', '.github/**/*.yml', '.github/**/*.sh', '.github/**/*.js', 'rust-toolchain') }}
key: work-${{ inputs.os }}-${{ inputs.cc }}-${{ inputs.ngx }}-${{ inputs.openresty }}-${{ inputs.runtime }}-${{ hashFiles('util/**/*.sh', 'util/**/*.pl', 'util/**/*.awk', '.github/**/*.yml', '.github/**/*.sh', '.github/**/*.js', 'rust-toolchain', 'Makefile') }}
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/job-valgrind-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
~/.rustup/settings.toml
~/.rustup/toolchains/*
~/.rustup/update-hashes/*
key: rust-toolchain-${{ runner.os }}-${{ hashFiles('.github/**/*.yml', '.github/**/*.sh') }}
key: rust-toolchain-${{ inputs.os }}-${{ hashFiles('.github/**/*.yml', '.github/**/*.sh', 'rust-toolchain') }}
- name: 'Setup cache - work/ dir'
uses: actions/cache@v3
if: ${{ !env.ACT }}
Expand All @@ -77,7 +77,7 @@ jobs:
work/downloads
work/runtimes
work/openssl
key: work-${{ runner.os }}-${{ inputs.cc }}-${{ inputs.ngx }}-${{ inputs.openresty }}-${{ inputs.runtime }}-${{ hashFiles('util/**/*.sh', 'util/**/*.pl', 'util/**/*.awk', '.github/**/*.yml', '.github/**/*.sh', '.github/**/*.js', 'rust-toolchain') }}
key: work-${{ inputs.os }}-${{ inputs.cc }}-${{ inputs.ngx }}-${{ inputs.openresty }}-${{ inputs.runtime }}-${{ hashFiles('util/**/*.sh', 'util/**/*.pl', 'util/**/*.awk', '.github/**/*.yml', '.github/**/*.sh', '.github/**/*.js', 'rust-toolchain', 'Makefile') }}
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
Expand Down

0 comments on commit 0e40da2

Please sign in to comment.