diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1eee09a..9307906 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,11 +2,11 @@ name: Build on: push: - branches: [ "main" ] + branches: ["main"] paths: - - 'src/**' - - 'build.zig' - - 'build.zig.zon' + - "src/**" + - "build.zig" + - "build.zig.zon" jobs: build: @@ -22,7 +22,7 @@ jobs: sudo apt-get install -y libpci-dev # macOS x86_64 - - os: macos-13 + - os: macos-15 target: x86_64-darwin runner_arch: x64 setup_deps: "" @@ -36,64 +36,64 @@ jobs: runs-on: ${{ matrix.os }} steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: Setup Zig - uses: mlugg/setup-zig@v2 - with: - version: 0.15.1 + - name: Setup Zig + uses: mlugg/setup-zig@v2 + with: + version: 0.15.1 - - name: Setup platform dependencies - if: matrix.setup_deps != '' - run: ${{ matrix.setup_deps }} + - name: Setup platform dependencies + if: matrix.setup_deps != '' + run: ${{ matrix.setup_deps }} - - name: Cache Zig - uses: actions/cache@v4 - with: - path: | - ~/.cache/zig - zig-cache - key: ${{ runner.os }}-${{ matrix.target }}-zig-${{ hashFiles('build.zig', 'build.zig.zon') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.target }}-zig- + - name: Cache Zig + uses: actions/cache@v4 + with: + path: | + ~/.cache/zig + zig-cache + key: ${{ runner.os }}-${{ matrix.target }}-zig-${{ hashFiles('build.zig', 'build.zig.zon') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.target }}-zig- - - name: Build for target - run: | - zig build -Doptimize=ReleaseSafe + - name: Build for target + run: | + zig build -Doptimize=ReleaseSafe - mv zig-out/bin/zigfetch zig-out/bin/zigfetch-${{ matrix.target }} + mv zig-out/bin/zigfetch zig-out/bin/zigfetch-${{ matrix.target }} - - name: Verify binary - run: | - ls -la zig-out/bin/ - file zig-out/bin/zigfetch-${{ matrix.target }} + - name: Verify binary + run: | + ls -la zig-out/bin/ + file zig-out/bin/zigfetch-${{ matrix.target }} - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: zigfetch-${{ matrix.target }} - path: zig-out/bin/zigfetch-${{ matrix.target }} - retention-days: 3 + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: zigfetch-${{ matrix.target }} + path: zig-out/bin/zigfetch-${{ matrix.target }} + retention-days: 3 test: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: Setup Zig - uses: mlugg/setup-zig@v2 - with: - version: 0.15.1 + - name: Setup Zig + uses: mlugg/setup-zig@v2 + with: + version: 0.15.1 - - name: Setup dependencies - run: | - sudo apt-get update - sudo apt-get install -y libpci-dev + - name: Setup dependencies + run: | + sudo apt-get update + sudo apt-get install -y libpci-dev - - name: Run tests - run: | - zig test src/ascii.zig - zig test src/utils.zig + - name: Run tests + run: | + zig test src/ascii.zig + zig test src/utils.zig