diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 49f9beba7..607a31a6b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,10 +4,21 @@ on: os: required: true type: string + system: + required: true + type: string + if: + required: false + default: true + type: boolean + run_tests: + required: false + default: true + type: boolean jobs: - build: + if: ${{ inputs.if }} strategy: fail-fast: false runs-on: ${{ inputs.os }} @@ -18,11 +29,22 @@ jobs: with: determinate: true - uses: DeterminateSystems/flakehub-cache-action@main - - run: echo "system=$(nix eval --impure --raw --expr 'builtins.currentSystem')" >> "$GITHUB_OUTPUT" - id: system - - run: nix build .# .#binaryTarball --no-link -L - - run: nix build .#binaryTarball --out-link tarball + - run: nix build .#packages.${{ inputs.system }}.default .#packages.${{ inputs.system }}.binaryTarball --no-link -L + - run: nix build .#packages.${{ inputs.system }}.binaryTarball --out-link tarball - uses: actions/upload-artifact@v4 with: - name: ${{ steps.system.outputs.system }} + name: ${{ inputs.system }} path: ./tarball/*.xz + test: + if: ${{ inputs.if && inputs.run_tests}} + strategy: + fail-fast: false + runs-on: ${{ inputs.os }} + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + with: + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main + - run: nix flake check -L --system ${{ inputs.system }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 147d25269..be68de764 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,62 +17,39 @@ jobs: eval: runs-on: blacksmith-32vcpu-ubuntu-2204 steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: DeterminateSystems/nix-installer-action@main - with: - determinate: true - - run: nix flake show --all-systems --json + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: DeterminateSystems/nix-installer-action@main + with: + determinate: true + - run: nix flake show --all-systems --json build_x86_64-linux: uses: ./.github/workflows/build.yml with: os: blacksmith-32vcpu-ubuntu-2204 + system: x86_64-linux build_aarch64-linux: - if: github.event_name == 'merge_group' uses: ./.github/workflows/build.yml with: + if: ${{ github.event_name == 'merge_group' }} os: blacksmith-32vcpu-ubuntu-2204-arm + system: aarch64-linux build_x86_64-darwin: - if: github.event_name == 'merge_group' uses: ./.github/workflows/build.yml with: - os: macos-latest-large + if: ${{ github.event_name == 'merge_group' }} + os: namespace-profile-mac-m2-12c28g + system: x86_64-darwin build_aarch64-darwin: uses: ./.github/workflows/build.yml with: - os: macos-latest-xlarge - - test_x86_64-linux: - uses: ./.github/workflows/test.yml - needs: build_x86_64-linux - with: - os: blacksmith-32vcpu-ubuntu-2204 - - test_aarch64-linux: - if: github.event_name == 'merge_group' - uses: ./.github/workflows/test.yml - needs: build_aarch64-linux - with: - os: blacksmith-32vcpu-ubuntu-2204-arm - - test_x86_64-darwin: - if: github.event_name == 'merge_group' - uses: ./.github/workflows/test.yml - needs: build_aarch64-darwin - with: - os: macos-latest-large - - test_aarch64-darwin: - if: github.event_name == 'merge_group' - uses: ./.github/workflows/test.yml - needs: build_aarch64-darwin - with: - os: macos-latest-xlarge + os: namespace-profile-mac-m2-12c28g + system: aarch64-darwin vm_tests_smoke: if: github.event_name != 'merge_group' @@ -155,7 +132,7 @@ jobs: run: nix build .#hydraJobs.manual - uses: nwtgck/actions-netlify@v3.0 with: - publish-dir: './result/share/doc/nix/manual' + publish-dir: "./result/share/doc/nix/manual" production-branch: detsys-main github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: "Deploy from GitHub Actions" diff --git a/.github/workflows/upload-release.yml b/.github/workflows/upload-release.yml index b600dfba0..083f39dfd 100644 --- a/.github/workflows/upload-release.yml +++ b/.github/workflows/upload-release.yml @@ -29,18 +29,29 @@ jobs: uses: ./.github/workflows/build.yml with: os: blacksmith-32vcpu-ubuntu-2204 + system: x86_64-linux + run_tests: false + build-aarch64-linux: uses: ./.github/workflows/build.yml with: os: blacksmith-32vcpu-ubuntu-2204-arm + system: aarch64-linux + run_tests: false + build-x86_64-darwin: uses: ./.github/workflows/build.yml with: os: macos-13 + system: x86_64-darwin + run_tests: false + build-aarch64-darwin: uses: ./.github/workflows/build.yml with: os: macos-latest + system: aarch64-darwin + run_tests: false release: runs-on: ubuntu-latest