nightly: build kratactl for all supported platforms

This commit is contained in:
Alex Zenla 2024-03-21 20:12:03 -07:00
parent 901ec3b6e5
commit b67b1d8340
No known key found for this signature in database
GPG Key ID: 067B238899B51269

View File

@ -4,7 +4,7 @@ on:
schedule: schedule:
- cron: "0 10 * * *" - cron: "0 10 * * *"
jobs: jobs:
build: server:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
@ -52,3 +52,41 @@ jobs:
name: krata-os-${{ matrix.arch }} name: krata-os-${{ matrix.arch }}
path: "target/os/krata-${{ matrix.arch }}.qcow2" path: "target/os/krata-${{ matrix.arch }}.qcow2"
compression-level: 0 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*"