ci.yml
This file
Path
.github/workflows/ci.yml
424 lines · 12.4 KiB · YAML
Last changed by
build(deps): bump the official-actions group with 2 updates (#3450)dependabot[bot]before adoptionea9e41f
History of this fileTake it
The walk stopped after 200 commits: lines older than 1617091 point at it.
website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 1–67why, one step back1name: CI2on: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-gnuUpdate CI runners to Ubuntu 24.04 and macOS Sonoma (#3208)itchynybefore adoptionecea2d2
line 68why, one step back68 runs-on: ${{ matrix.arch == 'i386' && 'ubuntu-22.04' || 'ubuntu-24.04' }}website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 69–77why, one step back69 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 repositorybuild(deps): bump actions/checkout from 5 to 6 in the official-actions group (#3439)dependabot[bot]before adoption39572e1
line 78why, one step back78 uses: actions/checkout@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 79–105why, one step back79 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 2 updates (#3450)dependabot[bot]before adoptionea9e41f
line 106why, one step back106 uses: actions/upload-artifact@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 107–113why, one step back107 with:108 name: test-logs-${{ env.SUFFIX }}109 retention-days: 7110 path: |111 test-suite.log112 tests/*.log113 - name: Upload artifactsbuild(deps): bump the official-actions group with 2 updates (#3450)dependabot[bot]before adoptionea9e41f
line 114why, one step back114 uses: actions/upload-artifact@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
line 115why, one step back115 with:Bump the official-actions group with 2 updates (#2998)dependabot[bot]before adoption2381d15
line 116why, one step back116 name: jq-${{ env.SUFFIX }}website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 117–132why, one step back117 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-darwinUpdate CI runners to Ubuntu 24.04 and macOS Sonoma (#3208)itchynybefore adoptionecea2d2
line 133why, one step back133 runs-on: macos-14website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 134–138why, one step back134 env:135 LDFLAGS: -dead_strip136 SUFFIX: macos-${{ matrix.arch }}137 steps:138 - name: Clone repositorybuild(deps): bump actions/checkout from 5 to 6 in the official-actions group (#3439)dependabot[bot]before adoption39572e1
line 139why, one step back139 uses: actions/checkout@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 140–156why, one step back140 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 back157 --disable-shared \website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 158–160why, one step back158 --enable-static \159 --enable-all-static \160 CFLAGS="-O2 -pthread -fstack-protector-all"ci.yml: use sysctl -n hw.logicalcpu instead of nproc on macosEmanuele Torrebefore adoption19453a6
line 161why, one step back161 make -j"$(sysctl -n hw.logicalcpu)"website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 162–170why, one step back162 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 2 updates (#3450)dependabot[bot]before adoptionea9e41f
line 171why, one step back171 uses: actions/upload-artifact@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 172–178why, one step back172 with:173 name: test-logs-${{ env.SUFFIX }}174 retention-days: 7175 path: |176 test-suite.log177 tests/*.log178 - name: Upload artifactsbuild(deps): bump the official-actions group with 2 updates (#3450)dependabot[bot]before adoptionea9e41f
line 179why, one step back179 uses: actions/upload-artifact@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
line 180why, one step back180 with:Bump the official-actions group with 2 updates (#2998)dependabot[bot]before adoption2381d15
line 181why, one step back181 name: jq-${{ env.SUFFIX }}website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 182–192why, one step back182 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 - i386CI: add builds for Windows arm64 (#3376)Dennis Amelingbefore adoption4357b61
line 193why, one step back193 - arm64website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 194–196why, one step back194 include:195 - arch: amd64196 msystem: UCRT64CI: add builds for Windows arm64 (#3376)Dennis Amelingbefore adoption4357b61
line 197why, one step back197 os: windows-2022website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 198–199why, one step back198 - arch: i386199 msystem: MINGW32CI: add builds for Windows arm64 (#3376)Dennis Amelingbefore adoption4357b61
lines 200–204why, one step back200 os: windows-2022201 - arch: arm64202 msystem: CLANGARM64203 os: windows-11-arm204 runs-on: ${{ matrix.os }}website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 205–215why, one step back205 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 repositorybuild(deps): bump actions/checkout from 5 to 6 in the official-actions group (#3439)dependabot[bot]before adoption39572e1
line 216why, one step back216 uses: actions/checkout@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 217–239why, one step back217 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 back240 CFLAGS="-O2 -pthread -fstack-protector-all -Wl,--stack,8388608"website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 241–249why, one step back241 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 2 updates (#3450)dependabot[bot]before adoptionea9e41f
line 250why, one step back250 uses: actions/upload-artifact@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 251–257why, one step back251 with:252 name: test-logs-${{ env.SUFFIX }}253 retention-days: 7254 path: |255 test-suite.log256 tests/*.log257 - name: Upload artifactsbuild(deps): bump the official-actions group with 2 updates (#3450)dependabot[bot]before adoptionea9e41f
line 258why, one step back258 uses: actions/upload-artifact@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
line 259why, one step back259 with:Bump the official-actions group with 2 updates (#2998)dependabot[bot]before adoption2381d15
line 260why, one step back260 name: jq-${{ env.SUFFIX }}website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 261–268why, one step back261 path: jq-${{ env.SUFFIX }}.exe262 if-no-files-found: error263 retention-days: 7264265 dist:266 runs-on: ubuntu-latest267 steps:268 - name: Clone repositorybuild(deps): bump actions/checkout from 5 to 6 in the official-actions group (#3439)dependabot[bot]before adoption39572e1
line 269why, one step back269 uses: actions/checkout@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 270–285why, one step back270 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 artifactsbuild(deps): bump the official-actions group with 2 updates (#3450)dependabot[bot]before adoptionea9e41f
line 286why, one step back286 uses: actions/upload-artifact@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 287–297why, one step back287 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 back298 id-token: write299 contents: read300 attestations: writewebsite: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 301–304why, one step back301 packages: write302 needs: linux303 steps:304 - name: Clone repositorybuild(deps): bump actions/checkout from 5 to 6 in the official-actions group (#3439)dependabot[bot]before adoption39572e1
line 305why, one step back305 uses: actions/checkout@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
line 306why, one step back306 - name: Download executablesbuild(deps): bump the official-actions group with 2 updates (#3450)dependabot[bot]before adoptionea9e41f
line 307why, one step back307 uses: actions/download-artifact@v7website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
line 308why, one step back308 with:Bump the official-actions group with 2 updates (#2998)dependabot[bot]before adoption2381d15
lines 309–310why, one step back309 pattern: jq-linux-*310 merge-multiple: truewebsite: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 311–335why, one step back311 - name: Move executables312 run: |313 mkdir -p linux/{386,amd64,arm64,mips64le,ppc64le,riscv64,s390x}314 mv jq-linux-i386 linux/386/jq315 mv jq-linux-amd64 linux/amd64/jq316 mv jq-linux-arm64 linux/arm64/jq317 mv jq-linux-mips64el linux/mips64le/jq318 mv jq-linux-ppc64el linux/ppc64le/jq319 mv jq-linux-riscv64 linux/riscv64/jq320 mv jq-linux-s390x linux/s390x/jq321 chmod +x linux/*/jq322 - name: Create Dockerfile323 run: |324 cat <<'EOF' >Dockerfile325 FROM scratch326 ARG TARGETPLATFORM327 COPY AUTHORS COPYING $TARGETPLATFORM/jq /328 RUN ["/jq", "--version"]329 ENTRYPOINT ["/jq"]330 EOF331 - name: Docker metadata332 uses: docker/metadata-action@v5333 id: metadata334 with:335 images: ghcr.io/${{ github.repository }}Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4
lines 336–337why, one step back336 tags: >337 ${{ startsWith(github.ref, 'refs/tags/jq-')Always build Docker image on CI, group Dependabot PRs for official actions (#2997)itchynybefore adoption56828b6
lines 338–339why, one step back338 && format('type=match,pattern=jq-(.*),group=1,value={0}', github.ref_name)339 || 'type=sha,format=long' }}website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 340–350why, one step back340 - name: Set up QEMU341 uses: docker/setup-qemu-action@v3342 - name: Set up Docker Buildx343 uses: docker/setup-buildx-action@v3344 - name: Login to GitHub Container Registry345 uses: docker/login-action@v3346 with:347 registry: ghcr.io348 username: ${{ github.repository_owner }}349 password: ${{ secrets.GITHUB_TOKEN }}350 - name: Build and release Docker imagebuild(deps): bump docker/build-push-action from 5 to 6 (#3143)dependabot[bot]before adoptionba741e5
line 351why, one step back351 uses: docker/build-push-action@v6Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4
line 352why, one step back352 id: build-pushwebsite: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 353–354why, one step back353 with:354 context: .Always build Docker image on CI, group Dependabot PRs for official actions (#2997)itchynybefore adoption56828b6
line 355why, one step back355 push: ${{ startsWith(github.ref, 'refs/tags/jq-') }}website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 356–359why, one step back356 provenance: false357 platforms: linux/386,linux/amd64,linux/arm64,linux/mips64le,linux/ppc64le,linux/riscv64,linux/s390x358 tags: ${{ steps.metadata.outputs.tags }}359 labels: ${{ steps.metadata.outputs.labels }}Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4
lines 360–361why, one step back360 - name: Generate signed attestations361 if: startsWith(github.ref, 'refs/tags/jq-')build(deps): bump the official-actions group with 2 updates (#3405)dependabot[bot]before adoption63c5f4e
line 362why, one step back362 uses: actions/attest-build-provenance@v3Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4
lines 363–366why, one step back363 with:364 subject-name: ghcr.io/${{ github.repository }}365 subject-digest: ${{ steps.build-push.outputs.digest }}366 push-to-registry: truewebsite: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 367–371why, one step back367368 release:369 runs-on: ubuntu-latest370 permissions:371 contents: writeGenerate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4
lines 372–373why, one step back372 id-token: write373 attestations: writewebsite: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 374–379why, one step back374 pull-requests: write375 environment: release376 needs: [linux, macos, windows, dist, docker]377 if: startsWith(github.ref, 'refs/tags/jq-')378 steps:379 - name: Clone repositorybuild(deps): bump actions/checkout from 5 to 6 in the official-actions group (#3439)dependabot[bot]before adoption39572e1
line 380why, one step back380 uses: actions/checkout@v6website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
line 381why, one step back381 - name: Download artifactsbuild(deps): bump the official-actions group with 2 updates (#3450)dependabot[bot]before adoptionea9e41f
line 382why, one step back382 uses: actions/download-artifact@v7Bump the official-actions group with 2 updates (#2998)dependabot[bot]before adoption2381d15
line 383why, one step back383 with:Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4
line 384why, one step back384 pattern: jq-*Bump the official-actions group with 2 updates (#2998)dependabot[bot]before adoption2381d15
line 385why, one step back385 merge-multiple: truewebsite: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 386–390why, one step back386 - name: Upload release387 env:388 TAG_NAME: ${{ github.ref_name }}389 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}390 run: |Bump the official-actions group with 2 updates (#2998)dependabot[bot]before adoption2381d15
lines 391–394why, one step back391 cp jq-linux-amd64 jq-linux64392 cp jq-macos-amd64 jq-osx-amd64393 cp jq-windows-amd64.exe jq-win64.exe394 sha256sum jq-* > sha256sum.txtwebsite: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
line 395why, one step back395 gh release create "$TAG_NAME" --draft --title "jq ${TAG_NAME#jq-}" --generate-notesBump the official-actions group with 2 updates (#2998)dependabot[bot]before adoption2381d15
line 396why, one step back396 gh release upload "$TAG_NAME" --clobber jq-* sha256sum.txtGenerate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4
line 397why, one step back397 - name: Generate signed attestationsbuild(deps): bump the official-actions group with 2 updates (#3405)dependabot[bot]before adoption63c5f4e
line 398why, one step back398 uses: actions/attest-build-provenance@v3Generate provenance attestations for release artifacts and docker image (#3225)lectricalbefore adoptionbcbf2b4
lines 399–400why, one step back399 with:400 subject-path: jq-*website: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 401–413why, one step back401 - name: Import GPG key402 uses: crazy-max/ghaction-import-gpg@v6403 with:404 gpg_private_key: ${{ secrets.JQ_RELEASE_GPG_PRIVATE_KEY }}405 passphrase: ${{ secrets.JQ_RELEASE_GPG_PASSPHRASE }}406 - name: Update signatures407 env:408 TAG_NAME: ${{ github.ref_name }}409 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}410 run: |411 sig_dir="sig/v${TAG_NAME#jq-}"412 mkdir -p "$sig_dir"413 mv sha256sum.txt "$sig_dir"Bump the official-actions group with 2 updates (#2998)dependabot[bot]before adoption2381d15
line 414why, one step back414 for file in jq-*; dowebsite: use https URLs instead of http URLs in download pageEmanuele Torrebefore adoption1617091
lines 415–424why, one step back415 gpg --detach-sign --armor --batch --output "${sig_dir}/${file#*/}.asc" "$file"416 done417 git add sig418 git config user.name 'github-actions[bot]'419 git config user.email 'github-actions[bot]@users.noreply.github.com'420 title="Update signatures of ${TAG_NAME#jq-}"421 git commit -m "$title"422 branch="update-signatures-${TAG_NAME#jq-}"423 git push origin "HEAD:refs/heads/$branch"424 gh pr create --title "$title" --body "" --head "$branch"