Skip to content

Commit

Permalink
support for multi-arch (#44)
Browse files Browse the repository at this point in the history
* support for multi-arch
Signed-off-by: smcavallo <[email protected]>

* build rust with cross

* update tests
  • Loading branch information
smcavallo authored Jan 29, 2024
1 parent 2699e91 commit fa7ba4f
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
42 changes: 29 additions & 13 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,45 @@ jobs:
with:
api-key: ${{secrets.FOSSA_API_KEY}}
test:
name: Build, test (x86)
name: Test (x86)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
- uses: houseabsolute/actions-rust-cross@v0
with:
command: test
args: -- --test-threads=1
- uses: actions-rs/cargo@v1
command: "test"
toolchain: stable
args: "--test-threads=1"
build:
name: Build
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
target: [ aarch64-unknown-linux-gnu, x86_64-unknown-linux-gnu ]
steps:
- uses: actions/checkout@v4
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: build
args: --release --all-features
command: "build"
target: ${{ matrix.target }}
toolchain: stable
args: "--locked --release --all-features"
strip: true
- uses: actions/upload-artifact@v4
with:
name: crd_gen
path: target/release/crd_gen
- uses: actions/upload-artifact@v4
with:
name: databricks_kube
path: target/release/databricks_kube
publish_image:
path: target/release/databricks_kube
publish:
name: Docker
runs-on: ubuntu-latest
needs: test
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
Expand All @@ -48,6 +59,10 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
Expand All @@ -68,5 +83,6 @@ jobs:
with:
context: .
push: true
platforms: linux/amd64, linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions charts/databricks-kube-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: 0.6.1
appVersion: 0.6.2
name: databricks-kube-operator
description: A kube-rs operator for managing Databricks API resources
version: 0.6.1
version: 0.6.2

home: https://github.com/mach-kernel/databricks-kube-operator
sources:
Expand Down
1 change: 0 additions & 1 deletion charts/databricks-kube-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ image:
podAnnotations: {}
nodeSelector:
kubernetes.io/os: linux
kubernetes.io/arch: amd64
resources: {}
affinity: {}
2 changes: 1 addition & 1 deletion databricks-kube/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ path = "src/crdgen.rs"
[package]
name = "databricks_kube"
default-run = "databricks_kube"
version = "0.6.1"
version = "0.6.2"
edition = "2021"

[dependencies]
Expand Down

0 comments on commit fa7ba4f

Please sign in to comment.