Skip to content

Commit

Permalink
Merge pull request #4209 from bcressey/build-all
Browse files Browse the repository at this point in the history
use build-all target for workflows
  • Loading branch information
bcressey authored Sep 23, 2024
2 parents 74970be + aad0caa commit 745f057
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 77 deletions.
24 changes: 0 additions & 24 deletions .github/actions/list-variants/action.yml

This file was deleted.

33 changes: 9 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,17 @@ concurrency:
cancel-in-progress: true

jobs:
list-variants:
# This needs to be its own job since the build job needs its output before
# it can initialize
if: github.repository == 'bottlerocket-os/bottlerocket'
name: "Determine variants"
runs-on: ubuntu-latest
outputs:
variants: ${{ steps.get-variants.outputs.variants }}
aarch-enemies: ${{ steps.get-variants.outputs.aarch-enemies }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/list-variants
id: get-variants

build:
needs: list-variants
if: github.repository == 'bottlerocket-os/bottlerocket'
runs-on:
group: bottlerocket
labels: bottlerocket_ubuntu-latest_32-core
continue-on-error: true
strategy:
matrix:
variant: ${{ fromJson(needs.list-variants.outputs.variants) }}
arch: [x86_64, aarch64]
exclude: ${{ fromJson(needs.list-variants.outputs.aarch-enemies) }}
fail-fast: false
name: "Build ${{ matrix.variant }}-${{ matrix.arch }}"
name: "Build ${{ matrix.arch }}"
steps:
- name: Random delay
run: |
Expand All @@ -60,11 +44,12 @@ jobs:
- name: Preflight step to set up the runner
uses: ./.github/actions/setup-node
- run: rustup component add rustfmt
- run: cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} unit-tests
- run: cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} check-fmt
- run: cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} check-clippy
- run: cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} check-shell
- run: cargo make unit-tests
- run: cargo make check-fmt
- run: cargo make check-clippy
- run: cargo make check-shell
- run: |
cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} \
cargo make \
-e BUILDSYS_ARCH=${{ matrix.arch }} \
-e BUILDSYS_JOBS=12
-e BUILDSYS_JOBS=12 \
build-all
33 changes: 4 additions & 29 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,23 @@ env:
GOPROXY: direct

jobs:
list-variants:
# This needs to be its own job since the build job needs its output before
# it can initialize
if: github.repository == 'bottlerocket-os/bottlerocket'
name: "Determine variants"
runs-on: ubuntu-latest
outputs:
variants: ${{ steps.get-variants.outputs.variants }}
aarch-enemies: ${{ steps.get-variants.outputs.aarch-enemies }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/list-variants
id: get-variants

build:
needs: list-variants
if: github.repository == 'bottlerocket-os/bottlerocket'
runs-on:
group: bottlerocket
labels: bottlerocket_ubuntu-latest_32-core
continue-on-error: false
strategy:
matrix:
variant: ${{ fromJson(needs.list-variants.outputs.variants) }}
arch: [x86_64, aarch64]
exclude: ${{ fromJson(needs.list-variants.outputs.aarch-enemies) }}
fail-fast: false
name: "Build ${{ matrix.variant }}-${{ matrix.arch }}"
name: "Build ${{ matrix.arch }}"
steps:
- uses: actions/checkout@v4
- name: Preflight step to set up the runner
uses: ./.github/actions/setup-node
- if: contains(matrix.variant, 'nvidia')
run: |
cat <<-EOF > Licenses.toml
[nvidia]
spdx-id = "LICENSE-LicenseRef-NVIDIA-Customer"
licenses = [
{ path = "NVIDIA", license-url = "https://www.nvidia.com/en-us/drivers/nvidia-license/" }
]
EOF
- run: |
cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} \
cargo make -e \
-e BUILDSYS_ARCH=${{ matrix.arch }} \
-e BUILDSYS_JOBS=12 \
-e BUILDSYS_UPSTREAM_LICENSE_FETCH="${{ contains(matrix.variant, 'nvidia') }}"
build-all
4 changes: 4 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ run_task = "run-twoliter"
dependencies = ["fetch-external-kits"]
run_task = "run-twoliter"

[tasks.build-all]
dependencies = ["fetch-external-kits"]
run_task = "run-twoliter"

[tasks.repack-variant]
run_task = "run-twoliter"

Expand Down

0 comments on commit 745f057

Please sign in to comment.