[KLC-1056] Protect from panics during module compilation (#9) #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: libvmexeccapi-build | |
on: | |
push: | |
branches: | |
- master | |
- klever | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Build dynamic library for ${{ matrix.os }} ${{ matrix.platform }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
platform: amd64 | |
artifact_name: libvmexeccapi.so | |
make_target: capi-linux-amd64 | |
- os: macos-13 | |
# github actions does not support amd64 on macos-14 | |
platform: amd64 | |
artifact_name: libvmexeccapi.dylib | |
make_target: capi-osx-amd64 | |
- os: macos-14 | |
platform: arm | |
artifact_name: libvmexeccapi_arm.dylib | |
make_target: capi-osx-arm | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup toolchain | |
run: rustup default 1.77.1 | |
- name: Add targets | |
run: | | |
rustup target add aarch64-unknown-linux-gnu | |
rustup target add aarch64-apple-darwin | |
- name: Make | |
run: make ${{ matrix.make_target }} | |
env: | |
PLATFORM: ${{ matrix.platform }} | |
- name: Save artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: libs | |
path: | | |
target/release/*.so | |
target/release/*.dylib | |
c-api/libvmexeccapi.h |