Skip to content

Commit 1294dff

Browse files
authored
Build binaries for Linux and MacOS (#93)
* Switch from openssl to rustls * trigger ci * Disable always failing openshift_preflight check * first try * fixup * No need for --release flag * remove uneeded stuff * Bump gobuild * Disable windows build * switch to dtolnay/rust-toolchain * switch to operator-rs main branch * bump operator-rs to 0.47.0 * fixup Cargo.toml * Avoid MPL-2.0 license
1 parent d7ae734 commit 1294dff

File tree

3 files changed

+241
-339
lines changed

3 files changed

+241
-339
lines changed

.github/workflows/build.yml

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -345,19 +345,57 @@ jobs:
345345
- id: printtag
346346
name: Output image name and tag
347347
run: echo "IMAGE_TAG=$(make -e print-docker-tag)" >> $GITHUB_OUTPUT
348-
openshift_preflight:
349-
name: Run the OpenShift Preflight check on the published images
350-
needs:
351-
- package_and_publish
352-
runs-on: ubuntu-latest
353-
env:
354-
IMAGE_TAG: ${{ needs.package_and_publish.outputs.IMAGE_TAG }}
348+
349+
build_stackablectl:
350+
name: Build stackablectl for ${{ matrix.target }}
351+
runs-on: ${{ matrix.os }}
352+
strategy:
353+
fail-fast: false
354+
matrix:
355+
include:
356+
- target: x86_64-unknown-linux-gnu
357+
os: ubuntu-latest
358+
# Currently Widnows build fails with
359+
# cargo:warning=# runtime/cgo
360+
# cargo:warning=cgo: C compiler "C:\\Program" not found: exec: "C:\\Program": file does not exist
361+
# error occurred: Command "go" "build" "-buildmode" "c-archive" "-o" "D:\\a\\stackable-cockpit\\stackable-cockpit\\target\\debug\\build\\helm-sys-cce901864d7b6e8c\\out\\libgo-helm-wrapper.a" "go-helm-wrapper/main.go" with args "go-helm-wrapper" did not execute successfully (status code exit code: 1).
362+
# so that Windows build is disabled for now
363+
# - target: x86_64-pc-windows-gnu
364+
# os: windows-latest
365+
- target: x86_64-apple-darwin
366+
os: macos-latest
367+
- target: aarch64-apple-darwin
368+
os: macos-latest
355369
steps:
356-
- name: Install preflight
357-
run: |
358-
wget https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/latest/download/preflight-linux-amd64
359-
chmod +x preflight-linux-amd64
360-
- name: Check container
361-
run: ./preflight-linux-amd64 check container "$IMAGE_TAG" > preflight.out
362-
- name: "Passed?"
363-
run: '[ "$(./preflight-linux-amd64 check container "$IMAGE_TAG" | jq -r .passed)" == true ]'
370+
- name: Checkout
371+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
372+
with:
373+
submodules: recursive
374+
- uses: dtolnay/rust-toolchain@0e66bd3e6b38ec0ad5312288c83e47c143e6b09e # v1
375+
with:
376+
toolchain: ${{ env.RUST_VERSION }}
377+
targets: ${{ matrix.target }}
378+
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
379+
with:
380+
key: build-stackablectl-${{ matrix.target }}
381+
- run: cargo build --target ${{ matrix.target }} -p stackablectl
382+
383+
# Commented out, as this was always failing.
384+
# We can comment it in again once want our image to be certified
385+
#
386+
# openshift_preflight:
387+
# name: Run the OpenShift Preflight check on the published images
388+
# needs:
389+
# - package_and_publish
390+
# runs-on: ubuntu-latest
391+
# env:
392+
# IMAGE_TAG: ${{ needs.package_and_publish.outputs.IMAGE_TAG }}
393+
# steps:
394+
# - name: Install preflight
395+
# run: |
396+
# wget https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/latest/download/preflight-linux-amd64
397+
# chmod +x preflight-linux-amd64
398+
# - name: Check container
399+
# run: ./preflight-linux-amd64 check container "$IMAGE_TAG" > preflight.out
400+
# - name: "Passed?"
401+
# run: '[ "$(./preflight-linux-amd64 check container "$IMAGE_TAG" | jq -r .passed)" == true ]'

0 commit comments

Comments
 (0)