Skip to content

Sync bela

Sync bela #325

Workflow file for this run

name: CI
on:
push:
paths-ignore:
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
- "docs/**"
- '**.md'
- '**.txt'
- "!CMakeLists.txt"
- 'LICENSE'
pull_request:
paths-ignore:
- "docs/**"
- '**.md'
- '**.txt'
- "!CMakeLists.txt"
- 'LICENSE'
jobs:
build:
name: Build
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
BelaUtils_target: [BelaUtils-win64, BelaUtils-win32, BelaUtils-arm64]
include:
- BelaUtils_target: BelaUtils-win64
short_target: win64
- BelaUtils_target: BelaUtils-win32
short_target: win32
- BelaUtils_target: BelaUtils-arm64
short_target: arm64
steps:
- uses: lukka/get-cmake@latest
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: compile-BelaUtils
run: pwsh -NoProfile -NoLogo -ExecutionPolicy unrestricted -File "./build.ps1" -Target "${{ matrix.short_target }}"
- name: Package release
if: startsWith(github.ref, 'refs/tags/')
shell: pwsh
# create package and show sha256 hash
run: |
Set-Location build
# cleanup zip files
Remove-Item -Force *.zip
cpack -G ZIP
$obj=Get-FileHash -Algorithm SHA256 BelaUtils*.zip
Split-Path -Leaf $obj.Path
$obj.Algorithm +":"+$obj.Hash.ToLower()
- name: Upload release
uses: svenstaro/upload-release-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
file_glob: true
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/BelaUtils-*.zip
tag: ${{ github.ref }}
overwrite: true