actions update #13
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 | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.name }} | |
# You may need to uncomment this part if using granular workflows. | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
include: | |
- name: macOS | |
os: macos-latest | |
- name: Linux-x64 | |
os: ubuntu-latest | |
- name: Windows-x64 | |
os: windows-latest | |
env: | |
SC_PATH: ${{ github.workspace }}/supercollider | |
BUILD_PATH: ${{ github.workspace }}/build | |
INSTALL_PATH: ${{ github.workspace }}/build/Install | |
ARCHIVE_NAME: ModeledModules-${{ matrix.name }}.zip | |
steps: | |
- name: Checkout ModeledModules | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Checkout SuperCollider | |
uses: actions/checkout@v4 | |
with: | |
repository: supercollider/supercollider | |
path: ${{ env.SC_PATH }} | |
ref: main | |
# Create a separate build directory | |
# We'll use this as our working directory for subsequent commands | |
- 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" "ModeledModules" | |
# Gather all files in a zip | |
- name: Zip up build (Windows) | |
if: runner.os == 'Windows' | |
shell: bash | |
working-directory: ${{ env.INSTALL_PATH }} | |
run: 7z a "$ARCHIVE_NAME" -tzip "ModeledModules" | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ env.INSTALL_PATH }}/${{ env.ARCHIVE_NAME }} | |
prerelease: true | |
body: "" | |
tag: ${{ github.ref }} |