From 6ad333aeee5d0d594ef9b9119bdd38583eec1005 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 11 Jul 2024 11:13:55 +0200 Subject: [PATCH 1/5] GitHub CI: Use a bigger builder for x86_64-linux Also, don't use a matrix for the 'tests' workflow, since we don't want the 'vm_tests' and 'flake_regressions' workflows to depend on aarch64-darwin. --- .github/workflows/ci.yml | 27 +++++++++++---------------- .github/workflows/test.yml | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8c5439bb..6b184288b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,23 +10,18 @@ permissions: jobs: - tests: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest] - runs-on: ${{ matrix.os }} - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - - uses: DeterminateSystems/nix-installer-action@main - with: - flakehub: true - - uses: DeterminateSystems/magic-nix-cache-action@main - - run: nix flake check -L + test_x86_64-linux: + uses: ./.github/workflows/test.yml + with: + os: UbuntuLatest32Cores128G + + test_aarch64-darwin: + uses: ./.github/workflows/test.yml + with: + os: macos-latest vm_tests: - needs: tests + needs: test_x86_64-linux runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -37,7 +32,7 @@ jobs: - run: nix build -L .#hydraJobs.tests.githubFlakes .#hydraJobs.tests.tarballFlakes flake_regressions: - needs: tests + needs: test_x86_64-linux runs-on: ubuntu-22.04 steps: - name: Checkout nix diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..14e4c5fa5 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +on: + workflow_call: + inputs: + os: + required: true + type: string + +jobs: + + tests: + strategy: + fail-fast: false + runs-on: ${{ inputs.os }} + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + with: + flakehub: true + - uses: DeterminateSystems/magic-nix-cache-action@main + - run: nix flake check -L From 83173fef17f84ca5a397ced74921ec95a196a50d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 11 Jul 2024 11:19:08 +0200 Subject: [PATCH 2/5] Avoid superfluous duplicate jobs on PRs --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b184288b..811c1c524 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,10 @@ name: "CI" on: pull_request: push: + branches: + - detsys-main + - main + - master permissions: id-token: "write" From 13e60dd649a5556de16418ffdfee247e27169364 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 11 Jul 2024 13:24:09 +0200 Subject: [PATCH 3/5] Build aarch64-linux --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 811c1c524..a3344f207 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,11 @@ jobs: with: os: UbuntuLatest32Cores128G + test_aarch64-linux: + uses: ./.github/workflows/test.yml + with: + os: UbuntuLatest32Cores128GArm + test_aarch64-darwin: uses: ./.github/workflows/test.yml with: From a4d1dfbab64cc83e029e4c34c5d2de97846bf474 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 11 Jul 2024 13:25:39 +0200 Subject: [PATCH 4/5] Split building and testing to improve parallelism --- .github/workflows/build.yml | 21 +++++++++++++++++++++ .github/workflows/ci.yml | 22 ++++++++++++++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..1cb645063 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,21 @@ +on: + workflow_call: + inputs: + os: + required: true + type: string + +jobs: + + tests: + strategy: + fail-fast: false + runs-on: ${{ inputs.os }} + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + with: + flakehub: true + - uses: DeterminateSystems/magic-nix-cache-action@main + - run: nix build diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3344f207..fd89614f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,23 +14,41 @@ permissions: jobs: + build_x86_64-linux: + uses: ./.github/workflows/build.yml + with: + os: UbuntuLatest32Cores128G + + build_aarch64-linux: + uses: ./.github/workflows/build.yml + with: + os: UbuntuLatest32Cores128GArm + + build_aarch64-darwin: + uses: ./.github/workflows/build.yml + with: + os: macos-latest + test_x86_64-linux: uses: ./.github/workflows/test.yml + needs: build_x86_64-linux with: os: UbuntuLatest32Cores128G test_aarch64-linux: uses: ./.github/workflows/test.yml + needs: build_aarch64-linux with: os: UbuntuLatest32Cores128GArm test_aarch64-darwin: uses: ./.github/workflows/test.yml + needs: build_aarch64-darwin with: os: macos-latest vm_tests: - needs: test_x86_64-linux + needs: build_x86_64-linux runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -41,7 +59,7 @@ jobs: - run: nix build -L .#hydraJobs.tests.githubFlakes .#hydraJobs.tests.tarballFlakes flake_regressions: - needs: test_x86_64-linux + needs: build_x86_64-linux runs-on: ubuntu-22.04 steps: - name: Checkout nix From f862424423d786fe9ade91f2319fe6f24ca50648 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 11 Jul 2024 13:39:24 +0200 Subject: [PATCH 5/5] Fix job name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1cb645063..ef7174c30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ on: jobs: - tests: + build: strategy: fail-fast: false runs-on: ${{ inputs.os }}