Skip to content
Myr

ci.yml

This file

Path

.github/workflows/ci.yml

425 lines · 12.4 KiB · YAML

Last changed by

build(deps): bump the official-actions group with 3 updates (#3494)dependabot[bot]before adoption36b6ae0

History of this file

Take it

The walk stopped after 200 commits: lines older than bd3c828 point at it.

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 1–67why, one step back
1name: CI
2on:3 push:4 branches:5 - master6 tags:7 - "jq-*"8 pull_request:910jobs:11 linux:12 strategy:13 fail-fast: false14 matrix:15 arch:16 - amd6417 - arm6418 - armel19 - armhf20 - i38621 - mips22 - mips6423 - mips64el24 - mips64r625 - mips64r6el26 - mipsel27 - mipsr628 - mipsr6el29 - powerpc30 - ppc64el31 - riscv6432 - s390x33 include:34 - arch: amd6435 CC: x86_64-linux-gnu36 - arch: arm6437 CC: aarch64-linux-gnu38 - arch: armel39 CC: arm-linux-gnueabi40 - arch: armhf41 CC: arm-linux-gnueabihf42 - arch: i38643 CC: i686-linux-gnu44 - arch: mips45 CC: mips-linux-gnu46 - arch: mips6447 CC: mips64-linux-gnuabi6448 - arch: mips64el49 CC: mips64el-linux-gnuabi6450 - arch: mips64r651 CC: mipsisa64r6-linux-gnuabi6452 - arch: mips64r6el53 CC: mipsisa64r6el-linux-gnuabi6454 - arch: mipsel55 CC: mipsel-linux-gnu56 - arch: mipsr657 CC: mipsisa32r6-linux-gnu58 - arch: mipsr6el59 CC: mipsisa32r6el-linux-gnu60 - arch: powerpc61 CC: powerpc-linux-gnu62 - arch: ppc64el63 CC: powerpc64le-linux-gnu64 - arch: riscv6465 CC: riscv64-linux-gnu66 - arch: s390x67 CC: s390x-linux-gnu

Update CI runners to Ubuntu 24.04 and macOS Sonoma (#3208)itchynybefore adoptionecea2d2

line 68why, one step back
68 runs-on: ${{ matrix.arch == 'i386' && 'ubuntu-22.04' || 'ubuntu-24.04' }}

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 69–77why, one step back
69 env:
70 AR: ${{ matrix.CC }}-ar71 CHOST: ${{ matrix.CC }}72 CC: ${{ matrix.CC }}-gcc73 CPP: ${{ matrix.CC }}-cpp74 LDFLAGS: -s75 SUFFIX: linux-${{ matrix.arch }}76 steps:77 - name: Clone repository

build(deps): bump actions/checkout from 5 to 6 in the official-actions group (#3439)dependabot[bot]before adoption39572e1

line 78why, one step back
78 uses: actions/checkout@v6

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 79–105why, one step back
79 with:
80 submodules: true81 - name: Install packages82 run: |83 sudo apt-get update84 sudo apt-get install -y automake autoconf libtool crossbuild-essential-${{ matrix.arch }}85 - name: Build86 run: |87 autoreconf -i88 ./configure \89 --host=${{ matrix.CC }} \90 --disable-docs \91 --with-oniguruma=builtin \92 --enable-static \93 --enable-all-static \94 CFLAGS="-O2 -pthread -fstack-protector-all"95 make -j"$(nproc)"96 file ./jq97 cp ./jq jq-${{ env.SUFFIX }}98 - name: Test99 # Only run tests for amd64 matching the CI machine arch100 if: ${{ matrix.arch == 'amd64' }}101 run: |102 make check VERBOSE=yes103 git diff --exit-code104 - name: Upload Test Logs105 if: ${{ failure() }}

build(deps): bump the official-actions group with 3 updates (#3494)dependabot[bot]before adoption36b6ae0

line 106why, one step back
106 uses: actions/upload-artifact@v7

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 107–113why, one step back
107 with:
108 name: test-logs-${{ env.SUFFIX }}109 retention-days: 7110 path: |111 test-suite.log112 tests/*.log113 - name: Upload artifacts

build(deps): bump the official-actions group with 3 updates (#3494)dependabot[bot]before adoption36b6ae0

line 114why, one step back
114 uses: actions/upload-artifact@v7

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 115–132why, one step back
115 with:
116 name: jq-${{ env.SUFFIX }}117 path: jq-${{ env.SUFFIX }}118 if-no-files-found: error119 retention-days: 7120121 macos:122 strategy:123 fail-fast: false124 matrix:125 arch:126 - amd64127 - arm64128 include:129 - arch: amd64130 target: x86_64-apple-darwin131 - arch: arm64132 target: arm64-apple-darwin

Update CI runners to Ubuntu 24.04 and macOS Sonoma (#3208)itchynybefore adoptionecea2d2

line 133why, one step back
133 runs-on: macos-14

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 134–138why, one step back
134 env:
135 LDFLAGS: -dead_strip136 SUFFIX: macos-${{ matrix.arch }}137 steps:138 - name: Clone repository

build(deps): bump actions/checkout from 5 to 6 in the official-actions group (#3439)dependabot[bot]before adoption39572e1

line 139why, one step back
139 uses: actions/checkout@v6

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 140–156why, one step back
140 with:
141 submodules: true142 - name: Install packages143 run: |144 # brew update sometimes fails with "Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed!"145 brew update || brew update-reset146 brew install autoconf automake libtool147 - name: Set CC148 run: |149 echo "CC=clang -target ${{ matrix.target }}$(uname -r)" >> "$GITHUB_ENV"150 - name: Build151 run: |152 autoreconf -i153 ./configure \154 --host="${{ matrix.target }}$(uname -r)" \155 --disable-docs \156 --with-oniguruma=builtin \

Disable shared libraries on macOS to avoid conflict with -all-static (#3261)itchynybefore adoptioneff9caf

line 157why, one step back
157 --disable-shared \

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 158–170why, one step back
158 --enable-static \
159 --enable-all-static \160 CFLAGS="-O2 -pthread -fstack-protector-all"161 make -j"$(sysctl -n hw.logicalcpu)"162 strip ./jq163 file ./jq164 cp ./jq jq-${{ env.SUFFIX }}165 - name: Test166 run: |167 make check VERBOSE=yes168 git diff --exit-code169 - name: Upload Test Logs170 if: ${{ failure() }}

build(deps): bump the official-actions group with 3 updates (#3494)dependabot[bot]before adoption36b6ae0

line 171why, one step back
171 uses: actions/upload-artifact@v7

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 172–178why, one step back
172 with:
173 name: test-logs-${{ env.SUFFIX }}174 retention-days: 7175 path: |176 test-suite.log177 tests/*.log178 - name: Upload artifacts

build(deps): bump the official-actions group with 3 updates (#3494)dependabot[bot]before adoption36b6ae0

line 179why, one step back
179 uses: actions/upload-artifact@v7

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 180–192why, one step back
180 with:
181 name: jq-${{ env.SUFFIX }}182 path: jq-${{ env.SUFFIX }}183 if-no-files-found: error184 retention-days: 7185186 windows:187 strategy:188 fail-fast: false189 matrix:190 arch:191 - amd64192 - i386

CI: add builds for Windows arm64 (#3376)Dennis Amelingbefore adoption4357b61

line 193why, one step back
193 - arm64

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 194–196why, one step back
194 include:
195 - arch: amd64196 msystem: UCRT64

CI: add builds for Windows arm64 (#3376)Dennis Amelingbefore adoption4357b61

line 197why, one step back
197 os: windows-2022

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 198–199why, one step back
198 - arch: i386
199 msystem: MINGW32

CI: add builds for Windows arm64 (#3376)Dennis Amelingbefore adoption4357b61

lines 200–204why, one step back
200 os: windows-2022
201 - arch: arm64202 msystem: CLANGARM64203 os: windows-11-arm204 runs-on: ${{ matrix.os }}

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 205–215why, one step back
205 env:
206 LDFLAGS: -s207 SUFFIX: windows-${{ matrix.arch }}208 defaults:209 run:210 shell: msys2 {0}211 steps:212 - name: Prepare git config213 run: git config --system core.autocrlf false214 shell: bash215 - name: Clone repository

build(deps): bump actions/checkout from 5 to 6 in the official-actions group (#3439)dependabot[bot]before adoption39572e1

line 216why, one step back
216 uses: actions/checkout@v6

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 217–239why, one step back
217 with:
218 submodules: true219 - uses: msys2/setup-msys2@v2220 with:221 update: true222 msystem: ${{ matrix.msystem }}223 install: >-224 base-devel225 git226 autoconf227 automake228 libtool229 pacboy: >-230 toolchain:p231 - name: Build232 run: |233 autoreconf -i234 ./configure \235 --disable-docs \236 --with-oniguruma=builtin \237 --disable-shared \238 --enable-static \239 --enable-all-static \

Increase the maximum printing depth from 256 to 10000 (fixes #3413) (#3414)Ish Nagybefore adoptionb29504b

line 240why, one step back
240 CFLAGS="-O2 -pthread -fstack-protector-all -Wl,--stack,8388608"

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 241–249why, one step back
241 make -j$(nproc)
242 file ./jq.exe243 cp ./jq.exe jq-${{ env.SUFFIX }}.exe244 - name: Test245 run: |246 make check VERBOSE=yes247 git diff --exit-code248 - name: Upload Test Logs249 if: ${{ failure() }}

build(deps): bump the official-actions group with 3 updates (#3494)dependabot[bot]before adoption36b6ae0

line 250why, one step back
250 uses: actions/upload-artifact@v7

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 251–257why, one step back
251 with:
252 name: test-logs-${{ env.SUFFIX }}253 retention-days: 7254 path: |255 test-suite.log256 tests/*.log257 - name: Upload artifacts

build(deps): bump the official-actions group with 3 updates (#3494)dependabot[bot]before adoption36b6ae0

line 258why, one step back
258 uses: actions/upload-artifact@v7

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 259–268why, one step back
259 with:
260 name: jq-${{ env.SUFFIX }}261 path: jq-${{ env.SUFFIX }}.exe262 if-no-files-found: error263 retention-days: 7264265 dist:266 runs-on: ubuntu-latest267 steps:268 - name: Clone repository

build(deps): bump actions/checkout from 5 to 6 in the official-actions group (#3439)dependabot[bot]before adoption39572e1

line 269why, one step back
269 uses: actions/checkout@v6

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 270–285why, one step back
270 with:
271 submodules: true272 - name: Install packages273 run: |274 sudo apt-get update -qq275 sudo apt-get install -y automake autoconf276 - name: Create dist277 run: |278 autoreconf -i279 ./configure \280 --disable-docs \281 --with-oniguruma=builtin282 make distcheck283 make dist dist-zip284 git diff --exit-code285 - name: Upload artifacts

build(deps): bump the official-actions group with 3 updates (#3494)dependabot[bot]before adoption36b6ae0

line 286why, one step back
286 uses: actions/upload-artifact@v7

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 287–297why, one step back
287 with:
288 name: jq-dist289 if-no-files-found: error290 retention-days: 7291 path: |292 jq-*.tar.gz293 jq-*.zip294295 docker:296 runs-on: ubuntu-latest297 permissions:

Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4

lines 298–300why, one step back
298 id-token: write
299 contents: read300 attestations: write

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 301–304why, one step back
301 packages: write
302 needs: linux303 steps:304 - name: Clone repository

build(deps): bump actions/checkout from 5 to 6 in the official-actions group (#3439)dependabot[bot]before adoption39572e1

line 305why, one step back
305 uses: actions/checkout@v6

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

line 306why, one step back
306 - name: Download executables

build(deps): bump the official-actions group with 3 updates (#3494)dependabot[bot]before adoption36b6ae0

line 307why, one step back
307 uses: actions/download-artifact@v8

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 308–312why, one step back
308 with:
309 pattern: jq-linux-*310 merge-multiple: true311 - name: Move executables312 run: |

Support arm/v7 architecture in Docker images (#3463)itchynybefore adoptiond44baeb

lines 313–314why, one step back
313 mkdir -p linux/{386,amd64,arm64,arm/v7,mips64le,ppc64le,riscv64,s390x}
314 chmod +x jq-linux-*

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 315–317why, one step back
315 mv jq-linux-i386 linux/386/jq
316 mv jq-linux-amd64 linux/amd64/jq317 mv jq-linux-arm64 linux/arm64/jq

Support arm/v7 architecture in Docker images (#3463)itchynybefore adoptiond44baeb

line 318why, one step back
318 mv jq-linux-armhf linux/arm/v7/jq

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 319–336why, one step back
319 mv jq-linux-mips64el linux/mips64le/jq
320 mv jq-linux-ppc64el linux/ppc64le/jq321 mv jq-linux-riscv64 linux/riscv64/jq322 mv jq-linux-s390x linux/s390x/jq323 - name: Create Dockerfile324 run: |325 cat <<'EOF' >Dockerfile326 FROM scratch327 ARG TARGETPLATFORM328 COPY AUTHORS COPYING $TARGETPLATFORM/jq /329 RUN ["/jq", "--version"]330 ENTRYPOINT ["/jq"]331 EOF332 - name: Docker metadata333 uses: docker/metadata-action@v5334 id: metadata335 with:336 images: ghcr.io/${{ github.repository }}

Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4

lines 337–338why, one step back
337 tags: >
338 ${{ startsWith(github.ref, 'refs/tags/jq-')

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 339–351why, one step back
339 && format('type=match,pattern=jq-(.*),group=1,value={0}', github.ref_name)
340 || 'type=sha,format=long' }}341 - name: Set up QEMU342 uses: docker/setup-qemu-action@v3343 - name: Set up Docker Buildx344 uses: docker/setup-buildx-action@v3345 - name: Login to GitHub Container Registry346 uses: docker/login-action@v3347 with:348 registry: ghcr.io349 username: ${{ github.repository_owner }}350 password: ${{ secrets.GITHUB_TOKEN }}351 - name: Build and release Docker image

build(deps): bump docker/build-push-action from 5 to 6 (#3143)dependabot[bot]before adoptionba741e5

line 352why, one step back
352 uses: docker/build-push-action@v6

Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4

line 353why, one step back
353 id: build-push

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 354–357why, one step back
354 with:
355 context: .356 push: ${{ startsWith(github.ref, 'refs/tags/jq-') }}357 provenance: false

Support arm/v7 architecture in Docker images (#3463)itchynybefore adoptiond44baeb

line 358why, one step back
358 platforms: linux/386,linux/amd64,linux/arm64,linux/arm/v7,linux/mips64le,linux/ppc64le,linux/riscv64,linux/s390x

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 359–360why, one step back
359 tags: ${{ steps.metadata.outputs.tags }}
360 labels: ${{ steps.metadata.outputs.labels }}

Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4

lines 361–362why, one step back
361 - name: Generate signed attestations
362 if: startsWith(github.ref, 'refs/tags/jq-')

build(deps): bump the official-actions group with 3 updates (#3494)dependabot[bot]before adoption36b6ae0

line 363why, one step back
363 uses: actions/attest@v4

Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4

lines 364–367why, one step back
364 with:
365 subject-name: ghcr.io/${{ github.repository }}366 subject-digest: ${{ steps.build-push.outputs.digest }}367 push-to-registry: true

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 368–372why, one step back
368
369 release:370 runs-on: ubuntu-latest371 permissions:372 contents: write

Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4

lines 373–374why, one step back
373 id-token: write
374 attestations: write

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 375–380why, one step back
375 pull-requests: write
376 environment: release377 needs: [linux, macos, windows, dist, docker]378 if: startsWith(github.ref, 'refs/tags/jq-')379 steps:380 - name: Clone repository

build(deps): bump actions/checkout from 5 to 6 in the official-actions group (#3439)dependabot[bot]before adoption39572e1

line 381why, one step back
381 uses: actions/checkout@v6

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

line 382why, one step back
382 - name: Download artifacts

build(deps): bump the official-actions group with 3 updates (#3494)dependabot[bot]before adoption36b6ae0

line 383why, one step back
383 uses: actions/download-artifact@v8

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

line 384why, one step back
384 with:

Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4

line 385why, one step back
385 pattern: jq-*

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 386–397why, one step back
386 merge-multiple: true
387 - name: Upload release388 env:389 TAG_NAME: ${{ github.ref_name }}390 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}391 run: |392 cp jq-linux-amd64 jq-linux64393 cp jq-macos-amd64 jq-osx-amd64394 cp jq-windows-amd64.exe jq-win64.exe395 sha256sum jq-* > sha256sum.txt396 gh release create "$TAG_NAME" --draft --title "jq ${TAG_NAME#jq-}" --generate-notes397 gh release upload "$TAG_NAME" --clobber jq-* sha256sum.txt

Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4

line 398why, one step back
398 - name: Generate signed attestations

build(deps): bump the official-actions group with 3 updates (#3494)dependabot[bot]before adoption36b6ae0

line 399why, one step back
399 uses: actions/attest@v4

Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4

lines 400–401why, one step back
400 with:
401 subject-path: jq-*

libm.h+builtin.c: add and use LIBM_DA and LIBM_DA_NO macrosEmanuele Torrebefore adoptionbd3c828

lines 402–425why, one step back
402 - name: Import GPG key
403 uses: crazy-max/ghaction-import-gpg@v6404 with:405 gpg_private_key: ${{ secrets.JQ_RELEASE_GPG_PRIVATE_KEY }}406 passphrase: ${{ secrets.JQ_RELEASE_GPG_PASSPHRASE }}407 - name: Update signatures408 env:409 TAG_NAME: ${{ github.ref_name }}410 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}411 run: |412 sig_dir="sig/v${TAG_NAME#jq-}"413 mkdir -p "$sig_dir"414 mv sha256sum.txt "$sig_dir"415 for file in jq-*; do416 gpg --detach-sign --armor --batch --output "${sig_dir}/${file#*/}.asc" "$file"417 done418 git add sig419 git config user.name 'github-actions[bot]'420 git config user.email 'github-actions[bot]@users.noreply.github.com'421 title="Update signatures of ${TAG_NAME#jq-}"422 git commit -m "$title"423 branch="update-signatures-${TAG_NAME#jq-}"424 git push origin "HEAD:refs/heads/$branch"425 gh pr create --title "$title" --body "" --head "$branch"