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

Release pipeline #2620

Merged
merged 11 commits into from
Jul 2, 2023
Prev Previous commit
Next Next commit
Add matrix to test all available GH Actions images
  • Loading branch information
owenthereal committed Jul 1, 2023
commit d295348dcb4e59f839d5e1263ac53af0d36802a7
76 changes: 30 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
name: CI
on:
push:
branches:
- master
tags:
- "v*"
pull_request:
owenthereal marked this conversation as resolved.
Show resolved Hide resolved
jobs:
linux:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
arch: [x86_64]
include:
- arch: x86_64
suffix: amd64
compiler: [gcc, clang]
image: [ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.image }}
env:
CC: ${{ matrix.compiler }}
SUFFIX: linux-${{ matrix.image}}-${{ matrix.compiler }}
steps:
- name: Clone repository
uses: actions/checkout@v3
Expand All @@ -32,8 +29,6 @@ jobs:
gdb \
python3
- name: Build
env:
CC: clang -arch ${{ matrix.arch }}
run: |
autoreconf -fi
./configure --disable-dependency-tracking \
Expand All @@ -43,39 +38,37 @@ jobs:
--with-oniguruma=builtin \
YACC="$(which bison) -y"
make
make dist
cp jq jq-linux-${{ matrix.suffix }}
cp jq jq-${{ env.SUFFIX }}
- name: Test
env:
CC: clang -arch ${{ matrix.arch }}
run: |
make check
- name: Upload Test Logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-logs-linux-${{ matrix.arch }}
name: test-logs-${{ env.SUFFIX }}
retention-days: 7
path: |
test-suite.log
tests/*.log
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: jq-linux-${{ matrix.suffix }}
name: jq-${{ env.SUFFIX }}
if-no-files-found: error
retention-days: 7
path: |
jq-linux-${{ matrix.suffix }}
jq-${{ env.SUFFIX }}
macos:
runs-on: macos-13
strategy:
fail-fast: false
matrix:
arch: [x86_64]
include:
- arch: x86_64
suffix: amd64
compiler: [gcc, clang]
image: [macos-11, macos-12, macos-13]
runs-on: ${{ matrix.image }}
env:
CC: ${{ matrix.compiler }}
SUFFIX: macos-${{ matrix.image}}-${{ matrix.compiler }}
steps:
- name: Clone repository
uses: actions/checkout@v3
Expand All @@ -92,8 +85,6 @@ jobs:
bison
sed -i.bak '/^AM_INIT_AUTOMAKE(\[-Wno-portability 1\.14\])$/s/14/11/' modules/oniguruma/configure.ac
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was this thing about?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was inherited from the old CI setup. I believe it was to enforce onigurma's automake to be on the same version as jq. I confirmed this is not needed now. Removing.

- name: Build
env:
CC: clang -arch ${{ matrix.arch }}
run: |
autoreconf -fi
./configure --disable-dependency-tracking \
Expand All @@ -103,39 +94,37 @@ jobs:
--with-oniguruma=builtin \
YACC="$(brew --prefix)/opt/bison/bin/bison -y"
make
make dist
cp jq jq-macos-${{ matrix.suffix }}
cp jq jq-${{ env.SUFFIX }}
- name: Test
env:
CC: clang -arch ${{ matrix.arch }}
run: |
make check
- name: Upload Test Logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-logs-macos-${{ matrix.arch }}
name: test-logs-${{ env.SUFFIX }}
retention-days: 7
path: |
test-suite.log
tests/*.log
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: jq-macos-${{ matrix.suffix }}
name: jq-${{ env.SUFFIX }}
if-no-files-found: error
retention-days: 7
path: |
jq-macos-${{ matrix.suffix }}
jq-${{ env.SUFFIX }}
windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch: [x86_64]
include:
- arch: x86_64
suffix: win64
compiler: [gcc]
image: [windows-2019, windows-2022]
runs-on: ${{ matrix.image }}
env:
CC: ${{ matrix.compiler }}
SUFFIX: windows-${{ matrix.image}}-${{ matrix.compiler }}
steps:
- name: Clone repository
uses: actions/checkout@v3
Expand All @@ -155,8 +144,6 @@ jobs:
flex
- name: Build
shell: msys2 {0}
env:
CC: clang -arch ${{ matrix.arch }}
run: |
autoreconf -fi
./configure --disable-dependency-tracking \
Expand All @@ -169,8 +156,7 @@ jobs:
--enable-all-static \
YACC="$(which bison) -y"
make
make dist
cp jq.exe jq-windows-${{ matrix.suffix }}.exe
cp jq.exe jq-${{ env.SUFFIX }}.exe
- name: Test
shell: msys2 {0}
run: |
Expand All @@ -180,22 +166,20 @@ jobs:
- name: Upload Test Logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
env:
CC: clang -arch ${{ matrix.arch }}
with:
name: test-logs-windows-${{ matrix.arch }}
name: test-logs-${{ env.SUFFIX }}
retention-days: 7
path: |
test-suite.log
tests/*.log
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: jq-windows-${{ matrix.suffix }}
name: jq-${{ env.SUFFIX }}
if-no-files-found: error
retention-days: 7
path: |
jq-windows-${{ matrix.suffix }}.exe
jq-${{ env.SUFFIX }}.exe
release:
runs-on: ubuntu-latest
permissions:
Expand Down
Loading