c++17 and updated actions #16
Workflow file for this run
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
on: | |
push: | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
workflow_dispatch: | |
inputs: | |
tag_name: | |
description: 'Tag name' | |
required: false | |
default: 'manual_run' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.name }} | |
strategy: | |
matrix: | |
include: | |
- name: 'Linux-x64' | |
os: ubuntu-latest | |
- name: 'Windows-x64' | |
os: windows-latest | |
- name: 'macOS-x64' | |
os: macos-12 | |
- name: 'macOS-12-arm64' | |
arch: arm64 | |
os: macos-12 | |
- name: 'macOS-latest-arm64' | |
arch: arm64 | |
os: macos-latest | |
env: | |
SC_PATH: ${{ github.workspace }}/supercollider | |
TORCH_PATH: ${{ github.workspace }}/libtorch | |
BUILD_PATH: ${{ github.workspace }}/build | |
INSTALL_PATH: ${{ github.workspace }}/build/Install | |
ARCHIVE_NAME: XPlayBuf-${{ matrix.name }}.zip | |
CMAKE_OSX_ARCHITECTURES: '${{ matrix.arch }}' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout SuperCollider | |
uses: actions/checkout@v2 | |
with: | |
repository: supercollider/supercollider | |
path: ${{ env.SC_PATH }} | |
ref: main | |
# Build | |
- name: Create Build Environment | |
shell: bash | |
run: cmake -E make_directory $BUILD_PATH | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{ env.BUILD_PATH }} | |
run: cmake .. -DCMAKE_BUILD_TYPE=Release -DSC_PATH="$SC_PATH" -DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" | |
- name: Build | |
shell: bash | |
working-directory: ${{ env.BUILD_PATH }} | |
env: | |
CMAKE_BUILD_PARALLEL_LEVEL: 4 | |
run: cmake --build . --config Release --target install | |
# Gather all files in a zip | |
- name: Zip up build (Unix) | |
if: runner.os != 'Windows' | |
shell: bash | |
working-directory: ${{ env.INSTALL_PATH }} | |
run: zip -r "$ARCHIVE_NAME" "XPlayBuf" | |
- name: Zip up build (Windows) | |
if: runner.os == 'Windows' | |
shell: bash | |
working-directory: ${{ env.INSTALL_PATH }} | |
run: 7z a "$ARCHIVE_NAME" -tzip "XPlayBuf" | |
# Upload | |
- name: Upload binaries to release | |
if: github.event_name == 'push' | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ env.INSTALL_PATH }}/${{ env.ARCHIVE_NAME }} | |
body: "" | |
tag: ${{ github.ref }} | |
# Upload: manual trigger | |
- name: Upload binaries to release | |
if: github.event_name == 'workflow_dispatch' | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ env.INSTALL_PATH }}/${{ env.ARCHIVE_NAME }} | |
prerelease: true | |
body: "" | |
tag: ${{github.event.inputs.tag_name}} | |