From 0e40da2a8c1ecc7b2d421b3c618423802c147eea Mon Sep 17 00:00:00 2001 From: Thibault Charbonnier Date: Wed, 23 Aug 2023 09:10:39 -0700 Subject: [PATCH 1/2] chore(ci) improve caching steps and ignore some files --- .github/workflows/ci.yml | 30 ++++++++++++++++++++---- .github/workflows/job-unit-tests.yml | 4 ++-- .github/workflows/job-valgrind-tests.yml | 4 ++-- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1da835c0..52bdacdea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -118,7 +126,8 @@ jobs: coverage: true secrets: inherit - coverage: + coveralls: + name: 'Coveralls' needs: unit runs-on: ubuntu-latest steps: @@ -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 @@ -249,7 +269,7 @@ jobs: debug: ${{ matrix.debug }} build: - name: 'Test builds' + name: 'Build' #if: ${{ false }} runs-on: ${{ matrix.os }} timeout-minutes: 45 @@ -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 diff --git a/.github/workflows/job-unit-tests.yml b/.github/workflows/job-unit-tests.yml index 3a4f80ed6..6048f84aa 100644 --- a/.github/workflows/job-unit-tests.yml +++ b/.github/workflows/job-unit-tests.yml @@ -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 }} @@ -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: diff --git a/.github/workflows/job-valgrind-tests.yml b/.github/workflows/job-valgrind-tests.yml index 871009cd6..d54ab9867 100644 --- a/.github/workflows/job-valgrind-tests.yml +++ b/.github/workflows/job-valgrind-tests.yml @@ -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 }} @@ -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: From 9712047e34e43df912e918be308b5881aad0215d Mon Sep 17 00:00:00 2001 From: Thibault Charbonnier Date: Thu, 24 Aug 2023 07:54:05 -0700 Subject: [PATCH 2/2] chore(ci) increase Valgrind timeout --- .github/workflows/job-valgrind-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/job-valgrind-tests.yml b/.github/workflows/job-valgrind-tests.yml index d54ab9867..cd7b8334b 100644 --- a/.github/workflows/job-valgrind-tests.yml +++ b/.github/workflows/job-valgrind-tests.yml @@ -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