Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci) improve caching steps and ignore some files #397

Merged
merged 2 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 3 additions & 3 deletions .github/workflows/job-valgrind-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
valgrind:
name: 'Valgrind tests'
runs-on: ${{ inputs.os }}
timeout-minutes: 120
timeout-minutes: 150
steps:
- run: sudo apt-get update && sudo apt-get install -y valgrind
- uses: actions/checkout@v3
Expand All @@ -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