Skip to content

Update release workflows (#15) #65

Update release workflows (#15)

Update release workflows (#15) #65

Workflow file for this run

name: "Building release binaries on MacOS"
on: [push]
jobs:
MacOS-Build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
arch: amd
- os: macos-latest-xlarge
arch: arm
env:
VERSION: 2.6.0
SO_VERSION: 2
YUBIHSMSDK_VERSION: 2021-08
steps:
- name: Checkout the Yubico/yubihsm-setup repository
uses: actions/checkout@v3
- name: Install dependecies
run: |
set -e -o pipefail
set -x
brew update
brew install cmake pkg-config gengetopt help2man libusb
brew reinstall openssl@3
- name: install libyubihsm
run: |
cd ..
git clone https://github.com/Yubico/yubihsm-shell.git
cd yubihsm-shell
mkdir build
cd build
cmake .. -DBUILD_ONLY_LIB=ON
make
- name: clone yubihsmrs
run: |
cd ..
git clone https://github.com/Yubico/yubihsmrs.git
- name: Build yubihsm-setup
run: |
set -e -o pipefail
set -x
mkdir $GITHUB_WORKSPACE/artifact
export PATH=$PATH:~/.cargo/bin
if [[ ! -x $(command -v rustc) ]]; then
curl -o rustup.sh https://sh.rustup.rs
bash ./rustup.sh -y
fi
RUSTFLAGS="-C link-args=-Wl,-rpath,\$ORIGIN/../lib" YUBIHSM_LIB_DIR=$GITHUB_WORKSPACE/../yubihsm-shell/build/lib cargo build --release
strip -u -r target/release/yubihsm-setup
install target/release/yubihsm-setup ../artifact
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: yubihsm-setup-darwin-${{ matrix.arch }}64
path: artifact