CICD.yml
This file
Path
.github/workflows/CICD.yml
277 lines · 9.5 KiB · YAML
Last changed by
build(deps): bump softprops/action-gh-release from 3.0.2 to 3.0.3dependabot[bot]before adoption0e01c8c
History of this fileTake it
The walk stopped after 200 commits: lines older than 86d6e2d point at it.
Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 1–15why, one step back1name: CICD23env:4 CICD_INTERMEDIATES_DIR: "_cicd-intermediates"5 MSRV_FEATURES: "--all-features"67on:8 workflow_dispatch:9 pull_request:10 push:11 branches:12 - master13 tags:14 - '*'15Merge pull request #1809 from tmccombs/attestationThayne McCombsbefore adoption97b3b04
line 16why, one step back16permissions:Merge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
line 17why, one step back17 contents: readMerge pull request #1809 from tmccombs/attestationThayne McCombsbefore adoption97b3b04
line 18why, one step back18Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 19–23why, one step back19jobs:20 crate_metadata:21 name: Extract crate metadata22 runs-on: ubuntu-latest23 steps:Merge pull request #2073 from sharkdp/dependabot/github_actions/actions/checkout-7.0.1Thayne McCombsbefore adoptionca51233
line 24why, one step back24 - uses: actions/checkout@v7.0.1Merge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
lines 25–26why, one step back25 with:26 persist-credentials: falseMerge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 27–43why, one step back27 - name: Extract crate information28 id: crate_metadata29 run: |30 echo "name=fd" | tee -a $GITHUB_OUTPUT31 cargo metadata --no-deps --format-version 1 | jq -r '"version=" + .packages[0].version' | tee -a $GITHUB_OUTPUT32 cargo metadata --no-deps --format-version 1 | jq -r '"maintainer=" + .packages[0].authors[0]' | tee -a $GITHUB_OUTPUT33 cargo metadata --no-deps --format-version 1 | jq -r '"homepage=" + .packages[0].homepage' | tee -a $GITHUB_OUTPUT34 cargo metadata --no-deps --format-version 1 | jq -r '"msrv=" + .packages[0].rust_version' | tee -a $GITHUB_OUTPUT35 outputs:36 name: ${{ steps.crate_metadata.outputs.name }}37 version: ${{ steps.crate_metadata.outputs.version }}38 maintainer: ${{ steps.crate_metadata.outputs.maintainer }}39 homepage: ${{ steps.crate_metadata.outputs.homepage }}40 msrv: ${{ steps.crate_metadata.outputs.msrv }}4142 ensure_cargo_fmt:43 name: Ensure 'cargo fmt' has been runMerge pull request #1712 from sharkdp/next-backThayne McCombsbefore adoptionabf4e47
line 44why, one step back44 runs-on: ubuntu-22.04Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 45–48why, one step back45 steps:46 - uses: dtolnay/rust-toolchain@stable47 with:48 components: rustfmtMerge pull request #2073 from sharkdp/dependabot/github_actions/actions/checkout-7.0.1Thayne McCombsbefore adoptionca51233
line 49why, one step back49 - uses: actions/checkout@v7.0.1Merge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
lines 50–51why, one step back50 with:51 persist-credentials: falseMerge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 52–60why, one step back52 - run: cargo fmt -- --check5354 lint_check:55 name: Ensure 'cargo clippy' has no warnings56 runs-on: ubuntu-latest57 steps:58 - uses: dtolnay/rust-toolchain@stable59 with:60 components: clippyMerge pull request #2073 from sharkdp/dependabot/github_actions/actions/checkout-7.0.1Thayne McCombsbefore adoptionca51233
line 61why, one step back61 - uses: actions/checkout@v7.0.1Merge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
lines 62–63why, one step back62 with:63 persist-credentials: falseMerge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 64–67why, one step back64 - run: cargo clippy --all-targets --all-features -- -Dwarnings6566 min_version:67 name: Minimum supported rust versionMerge pull request #1712 from sharkdp/next-backThayne McCombsbefore adoptionabf4e47
line 68why, one step back68 runs-on: ubuntu-22.04Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 69–71why, one step back69 needs: crate_metadata70 steps:71 - name: Checkout source codeMerge pull request #2073 from sharkdp/dependabot/github_actions/actions/checkout-7.0.1Thayne McCombsbefore adoptionca51233
line 72why, one step back72 uses: actions/checkout@v7.0.1Merge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
lines 73–74why, one step back73 with:74 persist-credentials: falseMerge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 75–81why, one step back7576 - name: Install rust toolchain (v${{ needs.crate_metadata.outputs.msrv }})77 uses: dtolnay/rust-toolchain@master78 with:79 toolchain: ${{ needs.crate_metadata.outputs.msrv }}80 components: clippy81 - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)Merge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
line 82why, one step back82 run: cargo clippy --locked --all-targets "${MSRV_FEATURES}"Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
line 83why, one step back83 - name: Run testsMerge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
line 84why, one step back84 run: cargo test --locked "${MSRV_FEATURES}"Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 85–86why, one step back8586 build:Merge pull request #1833 from tmccombs/build-fixesTavian Barnesbefore adoption15b57b9
line 87why, one step back87 name: '${{ matrix.job.target }} (${{ matrix.job.os }})'Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 88–89why, one step back88 runs-on: ${{ matrix.job.os }}89 needs: crate_metadataMerge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
lines 90–93why, one step back90 permissions:91 id-token: write92 contents: write93 attestations: writeMerge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 94–97why, one step back94 strategy:95 fail-fast: false96 matrix:97 job:Merge pull request #1776 from tmccombs/os-updateTavian Barnesbefore adoptionfd06e69
lines 98–101why, one step back98 - { target: aarch64-unknown-linux-gnu , os: ubuntu-24.04, use-cross: true }99 - { target: aarch64-unknown-linux-musl , os: ubuntu-24.04, use-cross: true }100 - { target: arm-unknown-linux-gnueabihf , os: ubuntu-24.04, use-cross: true }101 - { target: arm-unknown-linux-musleabihf, os: ubuntu-24.04, use-cross: true }Merge pull request #1946 from tmccombs/runner-os-updateTavian Barnesbefore adoptionfdb5534
line 102why, one step back102 - { target: i686-pc-windows-msvc , os: windows-2025 }Merge pull request #1776 from tmccombs/os-updateTavian Barnesbefore adoptionfd06e69
lines 103–104why, one step back103 - { target: i686-unknown-linux-gnu , os: ubuntu-24.04, use-cross: true }104 - { target: i686-unknown-linux-musl , os: ubuntu-24.04, use-cross: true }Merge pull request #1946 from tmccombs/runner-os-updateTavian Barnesbefore adoptionfdb5534
lines 105–108why, one step back105 - { target: x86_64-apple-darwin , os: macos-26-intel }106 - { target: aarch64-apple-darwin , os: macos-26 }107 - { target: x86_64-pc-windows-gnu , os: windows-2025 }108 - { target: x86_64-pc-windows-msvc , os: windows-2025 }Merge pull request #1716 from jcotton42/windows-aarch64Thayne McCombsbefore adoptiondbea8a6
line 109why, one step back109 - { target: aarch64-pc-windows-msvc , os: windows-11-arm }Merge pull request #1776 from tmccombs/os-updateTavian Barnesbefore adoptionfd06e69
lines 110–111why, one step back110 - { target: x86_64-unknown-linux-gnu , os: ubuntu-24.04, use-cross: true }111 - { target: x86_64-unknown-linux-musl , os: ubuntu-24.04, use-cross: true }Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
line 112why, one step back112 env:Merge pull request #1833 from tmccombs/build-fixesTavian Barnesbefore adoption15b57b9
line 113why, one step back113 BUILD_CMD: "${{ matrix.job.use-cross && 'cross' || 'cargo' }}"Merge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
lines 114–115why, one step back114 target: ${{ matrix.job.target }}115 name: ${{ needs.crate_metadata.outputs.name }}Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 116–117why, one step back116 steps:117 - name: Checkout source codeMerge pull request #2073 from sharkdp/dependabot/github_actions/actions/checkout-7.0.1Thayne McCombsbefore adoptionca51233
line 118why, one step back118 uses: actions/checkout@v7.0.1Merge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
lines 119–120why, one step back119 with:120 persist-credentials: falseMerge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 121–124why, one step back121122 - name: Install prerequisites123 shell: bash124 run: |Merge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
line 125why, one step back125 case ${target} inMerge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 126–133why, one step back126 arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;127 aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;128 esac129130 - name: Install Rust toolchain131 uses: dtolnay/rust-toolchain@stable132 with:133 targets: ${{ matrix.job.target }}Merge pull request #1813 from tmccombs/rust-versionThayne McCombsbefore adoptiond23ac06
line 134why, one step back134 toolchain: "stable"Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 135–137why, one step back135136 - name: Install cross137 if: matrix.job.use-crossMerge pull request #1834 from tmccombs/cross-installThayne McCombsbefore adoption491baaa
lines 138–149why, one step back138 env:139 cross_version: "v0.2.5"140 package_name: "cross-x86_64-unknown-linux-gnu.tar.gz"141 GH_TOKEN: "${{ github.token }}"142 run: |143 dir="$HOME/.local/bin/"144 mkdir -p "$dir"145 gh release download --repo cross-rs/cross \146 --pattern "${package_name}" -O - "${cross_version}" \147 | tar -C "$dir" -xz148 echo "$dir" >> $GITHUB_PATH149 echo "Installed cross $cross_version" >> $GITHUB_STEP_SUMMARYMerge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 150–161why, one step back150 - name: Show version information (Rust, cargo, GCC)151 shell: bash152 run: |153 gcc --version || true154 rustup -V155 rustup toolchain list156 rustup default157 cargo -V158 rustc -V159160 - name: Build161 shell: bashMerge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
line 162why, one step back162 run: $BUILD_CMD build --locked --release --target="${target}"Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 163–169why, one step back163164 - name: Set binary name & path165 id: bin166 shell: bash167 run: |168 # Figure out suffix of binary169 EXE_suffix=""Merge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
line 170why, one step back170 case ${target} inMerge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 171–174why, one step back171 *-pc-windows-*) EXE_suffix=".exe" ;;172 esac;173174 # Setup pathsMerge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
lines 175–176why, one step back175 BIN_NAME="${name}${EXE_suffix}"176 BIN_PATH="target/${target}/release/${BIN_NAME}"Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 177–187why, one step back177178 # Let subsequent steps know where to find the binary179 echo "BIN_PATH=${BIN_PATH}" >> $GITHUB_OUTPUT180 echo "BIN_NAME=${BIN_NAME}" >> $GITHUB_OUTPUT181182 - name: Set testing options183 id: test-options184 shell: bash185 run: |186 # test only library unit tests and binary for arm-type targets187 unset CARGO_TEST_OPTIONSMerge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
lines 188–189why, one step back188 case ${target} in189 arm-* | aarch64-*)Merge pull request #1833 from tmccombs/build-fixesTavian Barnesbefore adoption15b57b9
line 190why, one step back190 CARGO_TEST_OPTIONS="--bin=${name}" ;;Merge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
line 191why, one step back191 esacMerge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 192–195why, one step back192 echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_OUTPUT193194 - name: Run tests195 shell: bashMerge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
lines 196–198why, one step back196 env:197 cargo_test_options: ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}198 run: $BUILD_CMD test --locked --target="${target}" "${cargo_test_options}"Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 199–207why, one step back199200 - name: Generate completions201 id: completions202 shell: bash203 run: make completions204205 - name: Create tarball206 id: package207 shell: bashMerge pull request #1943 from tmccombs/archive-scriptThayne McCombsbefore adoptioncdea7f5
line 208why, one step back208 run: bash scripts/create-archive.shMerge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
lines 209–210why, one step back209 env:210 BIN_PATH: ${{ steps.bin.outputs.BIN_PATH }}Merge pull request #1943 from tmccombs/archive-scriptThayne McCombsbefore adoptioncdea7f5
lines 211–213why, one step back211 TARGET: ${{ env.target }}212 ARCHIVE_NAME: ${{ env.name }}-v${{ needs.crate_metadata.outputs.version }}-${{ env.target }}213 PKG_STAGING: "${{ env.CICD_INTERMEDIATES_DIR }}/package"Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 214–225why, one step back214215 - name: Create Debian package216 id: debian-package217 shell: bash218 if: startsWith(matrix.job.os, 'ubuntu')219 run: bash scripts/create-deb.sh220 env:221 TARGET: ${{ matrix.job.target }}222 DPKG_VERSION: ${{ needs.crate_metadata.version }}223 BIN_PATH: ${{ steps.bin.outputs.BIN_PATH }}224225 - name: "Artifact upload: tarball"Merge pull request #1809 from tmccombs/attestationThayne McCombsbefore adoption97b3b04
line 226why, one step back226 id: upload-tarballMerge pull request #1974 from sharkdp/dependabot/github_actions/actions/upload-artifact-7.0.1Tavian Barnesbefore adoption1cfac9f
line 227why, one step back227 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 228–230why, one step back228 with:229 name: ${{ steps.package.outputs.PKG_NAME }}230 path: ${{ steps.package.outputs.PKG_PATH }}Merge pull request #1941 from tmccombs/fix-attestThayne McCombsbefore adoption8a7ff7d
line 231why, one step back231 compression-level: 0 # tarball is already compressedMerge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 232–233why, one step back232233 - name: "Artifact upload: Debian package"Merge pull request #1809 from tmccombs/attestationThayne McCombsbefore adoption97b3b04
line 234why, one step back234 id: upload-debMerge pull request #1974 from sharkdp/dependabot/github_actions/actions/upload-artifact-7.0.1Tavian Barnesbefore adoption1cfac9f
line 235why, one step back235 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 236–239why, one step back236 if: steps.debian-package.outputs.DPKG_NAME237 with:238 name: ${{ steps.debian-package.outputs.DPKG_NAME }}239 path: ${{ steps.debian-package.outputs.DPKG_PATH }}Merge pull request #1941 from tmccombs/fix-attestThayne McCombsbefore adoption8a7ff7d
line 240why, one step back240 compression-level: 0 # deb files are already compressedMerge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 241–247why, one step back241242 - name: Check for release243 id: is-release244 shell: bash245 run: |246 unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi247 echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUTMerge pull request #1809 from tmccombs/attestationThayne McCombsbefore adoption97b3b04
line 248why, one step back248Merge pull request #1941 from tmccombs/fix-attestThayne McCombsbefore adoption8a7ff7d
line 249why, one step back249 - name: "Attest artifacts"Merge pull request #2091 from sharkdp/dependabot/github_actions/actions/attest-4.2.1Thayne McCombsbefore adoptionee20f42
line 250why, one step back250 uses: actions/attest@508db95dd578ae2727ebd6217d5ba78e4fbda05d # v4Merge pull request #1809 from tmccombs/attestationThayne McCombsbefore adoption97b3b04
lines 251–252why, one step back251 if: steps.is-release.outputs.IS_RELEASE252 with:Merge pull request #1941 from tmccombs/fix-attestThayne McCombsbefore adoption8a7ff7d
lines 253–255why, one step back253 subject-path: |254 ${{ steps.package.outputs.PKG_PATH }}255 ${{ steps.debian-package.outputs.DPKG_PATH }}Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 256–257why, one step back256257 - name: Publish archives and packagesbuild(deps): bump softprops/action-gh-release from 3.0.2 to 3.0.3dependabot[bot]before adoption0e01c8c
line 258why, one step back258 uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 259–272why, one step back259 if: steps.is-release.outputs.IS_RELEASE260 with:261 files: |262 ${{ steps.package.outputs.PKG_PATH }}263 ${{ steps.debian-package.outputs.DPKG_PATH }}264 env:265 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}266267 winget:268 name: Publish to Winget269 runs-on: ubuntu-latest270 needs: build271 if: startsWith(github.ref, 'refs/tags/v')272 steps:Merge pull request #1828 from HastD/zizmorThayne McCombsbefore adoption2f5ab52
line 273why, one step back273 - uses: vedantmgoyal9/winget-releaser@4ffc7888bffd451b357355dc214d43bb9f23917e # v2Merge pull request #1657 from sharkdp/dependabot/cargo/clap-4.5.23Tavian Barnesbefore adoption86d6e2d
lines 274–277why, one step back274 with:275 identifier: sharkdp.fd276 installers-regex: '-pc-windows-msvc\.zip$'277 token: ${{ secrets.WINGET_TOKEN }}