Skip to content
Merged
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
88 changes: 53 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Cache checkout
uses: actions/cache@v4
uses: actions/cache@v5
id: cache-checkout
with:
path: ${{ env.wc }}
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:

steps:
- name: Cache PCRE suite
uses: actions/cache@v4
uses: actions/cache@v5
id: cache-pcre
with:
path: pcre-suite/${{ env.pcre2 }}
Expand All @@ -70,19 +70,20 @@ jobs:
chmod -R ug-w pcre-suite

- name: Cache converted PCRE tests
uses: actions/cache@v4
uses: actions/cache@v5
id: cache-cvtpcre
with:
path: ${{ env.cvtpcre }}
key: cvtpcre-bmake-${{ matrix.os }}-gcc-DEBUG-AUSAN-${{ github.sha }}-${{ env.pcre2 }}

- name: Fetch build
- name: Restore build
if: steps.cache-cvtpcre.outputs.cache-hit != 'true'
uses: actions/cache@v4
uses: actions/cache/restore@v5
id: cache-build
with:
path: ${{ env.build }}
key: build-bmake-${{ matrix.os }}-gcc-DEBUG-AUSAN-${{ github.sha }} # arbitrary build, just for cvtpcre
fail-on-cache-miss: true

- name: Convert PCRE suite
if: steps.cache-cvtpcre.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -157,15 +158,16 @@ jobs:
cc: gcc # -fsanitize=fuzzer is clang-only

steps:
- name: Fetch checkout
uses: actions/cache@v4
- name: Restore checkout
uses: actions/cache/restore@v5
id: cache-checkout
with:
path: ${{ env.wc }}
key: checkout-${{ github.sha }}
fail-on-cache-miss: true

- name: Cache build
uses: actions/cache@v4
uses: actions/cache@v5
id: cache-build
with:
path: ${{ env.build }}
Expand Down Expand Up @@ -235,20 +237,26 @@ jobs:
make: pmake # not packaged

steps:
- name: Fetch checkout
uses: actions/cache@v4
- name: Restore checkout
uses: actions/cache/restore@v5
id: cache-checkout
with:
path: ${{ env.wc }}
key: checkout-${{ github.sha }}
fail-on-cache-miss: true

# An arbitary build.
- name: Fetch build
uses: actions/cache@v4
# Failing to fetch this is not fatal, we're testing Makefiles here.
# Some combinations of our options (pmake, EXPENSIVE_CHECKS, whatever)
# won't exist in cache because we didn't build those. That's okay for
# the purposes of this step, building those is harmless.
- name: Restore build
uses: actions/cache/restore@v5
id: cache-build
with:
path: ${{ env.build }}
key: build-${{ matrix.make }}-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.debug }}-${{ matrix.san }}-${{ github.sha }}
fail-on-cache-miss: false

# We don't need to build the entire repo to know that the makefiles work,
# I'm just deleting a couple of .o files and rebuilding those instead.
Expand Down Expand Up @@ -324,12 +332,13 @@ jobs:
san: MSAN # not supported

steps:
- name: Fetch checkout
uses: actions/cache@v4
- name: Restore checkout
uses: actions/cache/restore@v5
id: cache-checkout
with:
path: ${{ env.wc }}
key: checkout-${{ github.sha }}
fail-on-cache-miss: true

- name: Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
Expand All @@ -346,12 +355,13 @@ jobs:
brew install bmake pcre
${{ matrix.cc }} --version

- name: Fetch build
uses: actions/cache@v4
- name: Restore build
uses: actions/cache/restore@v5
id: cache-build
with:
path: ${{ env.build }}
key: build-${{ matrix.make }}-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.debug }}-${{ matrix.san }}-${{ github.sha }}
fail-on-cache-miss: true

- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
Expand Down Expand Up @@ -383,12 +393,13 @@ jobs:
cc: gcc # it's clang anyway

steps:
- name: Fetch checkout
uses: actions/cache@v4
- name: Restore checkout
uses: actions/cache/restore@v5
id: cache-checkout
with:
path: ${{ env.wc }}
key: checkout-${{ github.sha }}
fail-on-cache-miss: true

- name: Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
Expand All @@ -405,12 +416,13 @@ jobs:
brew install bmake
${{ matrix.cc }} --version

- name: Fetch build
uses: actions/cache@v4
- name: Restore build
uses: actions/cache/restore@v5
id: cache-build
with:
path: ${{ env.build }}
key: build-${{ matrix.make }}-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.debug }}-${{ matrix.san }}-${{ github.sha }}
fail-on-cache-miss: true

# note we do the fuzzing unconditionally; each run adds to the corpus.
#
Expand Down Expand Up @@ -515,15 +527,16 @@ jobs:
sudo apt-get install golang
go version

- name: Fetch build
uses: actions/cache@v4
- name: Restore build
uses: actions/cache/restore@v5
id: cache-build
with:
path: ${{ env.build }}
key: build-${{ matrix.make }}-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.debug }}-${{ matrix.san }}-${{ github.sha }}
fail-on-cache-miss: true

- name: Fetch converted PCRE tests
uses: actions/cache@v4
uses: actions/cache@v5
id: cache-cvtpcre
with:
path: ${{ env.cvtpcre }}
Expand All @@ -542,7 +555,7 @@ jobs:

steps:
- name: Cache docs
uses: actions/cache@v4
uses: actions/cache@v5
id: cache-docs
with:
path: ${{ env.build }}
Expand All @@ -555,13 +568,14 @@ jobs:
sudo apt-get update
sudo apt-get install bmake libxml2-utils xsltproc docbook-xml docbook-xsl

- name: Fetch checkout
- name: Restore checkout
if: steps.cache-docs.outputs.cache-hit != 'true'
uses: actions/cache@v4
uses: actions/cache/restore@v5
id: cache-checkout
with:
path: ${{ env.wc }}
key: checkout-${{ github.sha }}
fail-on-cache-miss: true

- name: Get number of CPU cores
if: steps.cache-docs.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -597,7 +611,7 @@ jobs:

steps:
- name: Cache prefix
uses: actions/cache@v4
uses: actions/cache@v5
id: cache-prefix
with:
path: ${{ env.prefix }}
Expand All @@ -609,29 +623,32 @@ jobs:
uname -a
sudo apt-get install bmake

- name: Fetch checkout
- name: Restore checkout
if: steps.cache-prefix.outputs.cache-hit != 'true'
uses: actions/cache@v4
uses: actions/cache/restore@v5
id: cache-checkout
with:
path: ${{ env.wc }}
key: checkout-${{ github.sha }}
fail-on-cache-miss: true

- name: Fetch build
- name: Restore build
if: steps.cache-prefix.outputs.cache-hit != 'true'
uses: actions/cache@v4
uses: actions/cache/restore@v5
id: cache-build
with:
path: ${{ env.build }}
key: build-${{ env.make }}-${{ env.os }}-${{ env.cc }}-${{ env.debug }}-${{ env.san }}-${{ github.sha }}
fail-on-cache-miss: true

- name: Fetch docs
- name: Restore docs
if: steps.cache-prefix.outputs.cache-hit != 'true'
uses: actions/cache@v4
uses: actions/cache/restore@v5
id: cache-docs
with:
path: ${{ env.build }}
key: docs-${{ github.sha }}
fail-on-cache-miss: true

- name: Get number of CPU cores
if: steps.cache-prefix.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -670,12 +687,13 @@ jobs:
sudo gem install --no-document fpm
fpm -v

- name: Fetch prefix
uses: actions/cache@v4
- name: Restore prefix
uses: actions/cache/restore@v5
id: cache-prefix
with:
path: ${{ env.prefix }}
key: prefix-${{ env.make }}-${{ env.os }}-${{ env.cc }}-${{ env.debug }}-${{ env.san }}-${{ github.sha }}
fail-on-cache-miss: true

- name: Find version
# TODO: would get a tag or branch name here
Expand Down