Skip to content

Commit

Permalink
fix: ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-segning committed Aug 13, 2024
1 parent 2d9478f commit f19b7e1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ jobs:
push: "${{ github.ref == 'refs/heads/main' && 'true' || 'false' }}"
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64 #,linux/arm64,linux/arm/v7
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
33 changes: 29 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- x86_64-unknown-freebsd
#- x86_64-apple-darwin
#- aarch64-apple-darwin
#- x86_64-pc-windows-gnu
#- aarch64-pc-windows-msvc

Expand All @@ -37,6 +34,32 @@ jobs:
run: cross build --release --target ${{ matrix.target }}
working-directory: wazuh-cert-oauth2-client

- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: wazuh-cert-oauth2-client-${{ matrix.target }}
path: wazuh-cert-oauth2-client/target/${{ matrix.target }}/release/wazuh-cert-oauth2-client*

build-macos:
name: Build CLI for macOS
runs-on: macos-latest
strategy:
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install macOS target
run: rustup target add ${{ matrix.target }}

- name: Build with cargo
run: cargo build --release --target ${{ matrix.target }}
working-directory: wazuh-cert-oauth2-client

- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
Expand All @@ -46,7 +69,9 @@ jobs:
release:
name: Release
permissions: write-all
needs: build
needs:
- build-ubuntu
- build-macos
if: github.ref == 'refs/tags/v*'
runs-on: ubuntu-latest
steps:
Expand Down
7 changes: 0 additions & 7 deletions wazuh-cert-oauth2-client/Cross.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ pre-build = [
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH"
]

[target.x86_64-unknown-freebsd]
pre-build = ["""
export FREEBSD_MIRROR=$(/freebsd-fetch-best-mirror.sh) &&
/freebsd-setup-packagesite.sh &&
/freebsd-install-package.sh xen-tools
"""]

[target.aarch64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
Expand Down

0 comments on commit f19b7e1

Please sign in to comment.