From b67b1d8340f79655189a20d6a794413d8d9797eb Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Thu, 21 Mar 2024 20:12:03 -0700 Subject: [PATCH] nightly: build kratactl for all supported platforms --- .github/workflows/nightly.yml | 40 ++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index b8f4f7e..b755483 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -4,7 +4,7 @@ on: schedule: - cron: "0 10 * * *" jobs: - build: + server: runs-on: ubuntu-latest strategy: matrix: @@ -52,3 +52,41 @@ jobs: name: krata-os-${{ matrix.arch }} path: "target/os/krata-${{ matrix.arch }}.qcow2" compression-level: 0 + client: + strategy: + matrix: + os: + - { name: linux, on: ubuntu-latest } + - { name: darwin, on: macos-14 } + - { name: windows, on: windows-latest } + arch: + - x86_64 + - aarch64 + exclude: + # aarch64 windows support is not available in downstream dependencies + - os: { name: windows, on: windows-latest } + arch: aarch64 + env: + TARGET_OS: "${{ matrix.os.name }}" + TARGET_ARCH: "${{ matrix.arch }}" + runs-on: "${{ matrix.os.on }}" + name: build ${{ matrix.os.name }}-${{ matrix.arch }} + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + if: ${{ matrix.os.name != 'darwin' }} + - uses: dtolnay/rust-toolchain@stable + with: + targets: "${{ matrix.arch }}-apple-darwin" + if: ${{ matrix.os.name == 'darwin' }} + - uses: homebrew/actions/setup-homebrew@master + if: ${{ matrix.os.name == 'darwin' }} + - run: ./hack/ci/install-${{ matrix.os.name }}-deps.sh + - run: ./hack/build/cargo.sh build --release --bin kratactl + - uses: actions/upload-artifact@v4 + with: + name: kratactl-${{ matrix.os.name }}-${{ matrix.arch }} + path: "target/*/release/kratactl*"