build(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.0 #513
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Go | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: | |
| - '*.*.*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ixsystems/zfs:latest | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v7 | |
| - name: Set safe directory for git | |
| run: | | |
| git config --system --add safe.directory '*' | |
| git config --global --add safe.directory '*' | |
| git config --global --add safe.directory '/__w/zfs-file-history/zfs-file-history' | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version: '^1.23' | |
| - uses: extractions/setup-just@v4 | |
| - name: Test | |
| run: just test | |
| build: | |
| name: Build linux/${{ matrix.goarch }} | |
| runs-on: ${{ matrix.runner }} | |
| needs: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - goarch: amd64 | |
| runner: ubuntu-latest | |
| native: true | |
| just_target: build | |
| - goarch: arm64 | |
| runner: ubuntu-24.04-arm | |
| native: true | |
| just_target: build | |
| - goarch: ppc64le | |
| runner: ubuntu-24.04 | |
| native: false | |
| just_target: build | |
| cc: powerpc64le-linux-gnu-gcc | |
| dpkg_arch: ppc64el | |
| cross_pkg: crossbuild-essential-ppc64el | |
| zfs_pkg: libzfslinux-dev:ppc64el | |
| - goarch: s390x | |
| runner: ubuntu-24.04 | |
| native: false | |
| just_target: build | |
| cc: s390x-linux-gnu-gcc | |
| dpkg_arch: s390x | |
| cross_pkg: crossbuild-essential-s390x | |
| zfs_pkg: libzfslinux-dev:s390x | |
| - goarch: riscv64 | |
| runner: ubuntu-24.04 | |
| native: false | |
| just_target: build | |
| cc: riscv64-linux-gnu-gcc | |
| dpkg_arch: riscv64 | |
| cross_pkg: crossbuild-essential-riscv64 | |
| zfs_pkg: libzfslinux-dev:riscv64 | |
| steps: | |
| - name: Install libzfslinux-dev (native) | |
| if: matrix.native | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libzfslinux-dev | |
| - name: Set up multiarch and cross-compilation toolchain | |
| if: ${{ !matrix.native }} | |
| run: | | |
| sudo dpkg --add-architecture ${{ matrix.dpkg_arch }} | |
| # Replace the runner's ubuntu.sources with one pinned to amd64 only. | |
| sudo tee /etc/apt/sources.list.d/ubuntu.sources > /dev/null << 'EOF' | |
| Types: deb | |
| URIs: http://azure.archive.ubuntu.com/ubuntu | |
| Suites: noble noble-updates noble-backports noble-security | |
| Components: main restricted universe multiverse | |
| Architectures: amd64 | |
| Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg | |
| EOF | |
| # Add ports.ubuntu.com for the foreign arch | |
| printf 'Types: deb\nURIs: http://ports.ubuntu.com/ubuntu-ports\nSuites: noble noble-updates noble-security\nComponents: main restricted universe multiverse\nArchitectures: %s\nSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n' "${{ matrix.dpkg_arch }}" | sudo tee /etc/apt/sources.list.d/ports-${{ matrix.dpkg_arch }}.sources | |
| sudo apt-get update | |
| sudo apt-get install -y ${{ matrix.cross_pkg }} ${{ matrix.zfs_pkg }} | |
| - name: Checkout the repository | |
| uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version: '^1.23' | |
| - uses: extractions/setup-just@v4 | |
| - name: Generate build files (${{ matrix.goarch }}) | |
| run: | | |
| OUTPUT_BIN="dist/zfs-file-history-linux-${{ matrix.goarch }}" | |
| # Pass cross-compilation variables explicitly as arguments to just | |
| just \ | |
| GOOS="linux" \ | |
| GOARCH="${{ matrix.goarch }}" \ | |
| CC="${{ matrix.cc }}" \ | |
| OUTPUT_BIN="${OUTPUT_BIN}" \ | |
| ${{ matrix.just_target }} | |
| file "${OUTPUT_BIN}" | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: zfs-file-history-linux-${{ matrix.goarch }} | |
| path: dist/zfs-file-history-linux-${{ matrix.goarch }} | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: dist/ | |
| merge-multiple: true | |
| - name: Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: | | |
| dist/zfs-file-history-linux-amd64 | |
| dist/zfs-file-history-linux-arm64 | |
| dist/zfs-file-history-linux-ppc64le | |
| dist/zfs-file-history-linux-s390x | |
| dist/zfs-file-history-linux-riscv64 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |