Skip to content

Commit

Permalink
Some actions cleanups (#1105)
Browse files Browse the repository at this point in the history
1. Ninja not Unix Makefiles on windows; Ninja on mac
2. matrix for multi-style docker liux build
  • Loading branch information
baconpaul authored Aug 14, 2024
1 parent cb05202 commit 2c54f96
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 52 deletions.
24 changes: 8 additions & 16 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,31 @@ jobs:
target: scxt_clapfirst_Standalone
cmakeConfig: -A x64
runTests: false

- name: "windows clang"
os: windows-latest
target: scxt_clapfirst_Standalone
cmakeConfig: -G"Unix Makefiles" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
cmakeConfig: -GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
runTests: false

- name: "mac standalone"
os: macos-latest
target: scxt_clapfirst_Standalone
cmakeConfig: -GNinja
runTests: true

- name: "ubuntu standalone"
os: ubuntu-latest
target: shortcircuit-installer
target: scxt_clapfirst_Standalone
cmakeConfig: -GNinja
runTests: true

- name: "windows juce style"
os: windows-latest
target: scxt_plugin_Standalone
cmakeConfig: -DSCXT_JUCE_CLASSIC_STYLE=TRUE
runTests: false

- name: "mac juce style"
os: macos-latest
target: scxt_plugin_Standalone
cmakeConfig: -DSCXT_JUCE_CLASSIC_STYLE=TRUE
runTests: false
- name: "ubuntu juce style"
os: ubuntu-latest
target: scxt_plugin_Standalone
cmakeConfig: -DSCXT_JUCE_CLASSIC_STYLE=TRUE
cmakeConfig: -GNinja -DSCXT_JUCE_CLASSIC_STYLE=TRUE
runTests: false


steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -64,7 +56,7 @@ jobs:

- name: Build pull request version
run: |
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmakeConfig }}
cmake -S . -B ./build ${{ matrix.cmakeConfig }} -DCMAKE_BUILD_TYPE=Debug
cmake --build ./build --config Debug --target ${{ matrix.target }} --parallel 3
- name: Run Tests
Expand Down
56 changes: 20 additions & 36 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
#cmakeArgs: -G"Unix Makefiles" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
cmakeArgs: -A x64
- os: macos-latest
cmakeArgs: -D"CMAKE_OSX_ARCHITECTURES=arm64;x86_64"
cmakeArgs: -GNinja -D"CMAKE_OSX_ARCHITECTURES=arm64;x86_64"
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
export MAC_SIGNING_1UPW="${{ secrets.MAC_SIGNING_1UPW }}"
export MAC_SIGNING_TEAM="${{ secrets.MAC_SIGNING_TEAM }}"
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmakeArgs }}
cmake -S . -B ./build ${{ matrix.cmakeArgs }} -DCMAKE_BUILD_TYPE=Release
cmake --build ./build --config Release --target shortcircuit-installer --parallel 3
- name: Show Installer Directory
Expand All @@ -63,38 +63,21 @@ jobs:
path: build/installer
name: build-${{ matrix.os }}

build_plugin_docker_clapfirst:
name: Docker Build Ubuntu18 Clap First
build_plugin_docker:
name: Docker Build Ubuntu18 ${{ matrix.name }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Build in Docker
uses: surge-synthesizer/sst-githubactions/cmake-in-docker@main
with:
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}
cmakeArgs: -DSCXT_JUCE_CLASSIC_STYLE=FALSE -DSCXT_EXTRA_INSTALLER_NAME="ClapFirst-" -DCMAKE_BUILD_TYPE=Release -GNinja
target: shortcircuit-installer


- name: Show Installer Directory
run: |
ls -l ./build/installer
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: build/installer
name: build-docker-clapfirst

strategy:
matrix:
include:
- name: Clap First
juce_style: FALSE
installer_name: ""
installer_dir: clapfirst
- name: Juce Style
juce_style: TRUE
installer_name: "OldJuceStyle-"
installer_dir: jucestyle

build_plugin_docker_jucestyle:
name: Docker Build Ubuntu18 Juce Style
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -106,7 +89,7 @@ jobs:
with:
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}
cmakeArgs: -DSCXT_JUCE_CLASSIC_STYLE=TRUE -DSCXT_EXTRA_INSTALLER_NAME="JuceStyle-" -DCMAKE_BUILD_TYPE=Release -GNinja
cmakeArgs: -DSCXT_JUCE_CLASSIC_STYLE=${{ matrix.juce_style }} -DSCXT_EXTRA_INSTALLER_NAME="${{matrix.installer_name }}" -DCMAKE_BUILD_TYPE=Release -GNinja
target: shortcircuit-installer


Expand All @@ -118,13 +101,14 @@ jobs:
uses: actions/upload-artifact@v4
with:
path: build/installer
name: build-docker-jucestyle
name: build-docker-${{matrix.installer_dir }}


publish-scxt-nightly:
name: Publish scxt Nightly
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'surge-synthesizer' }}
runs-on: ubuntu-latest
needs: [ build_plugin, build_plugin_docker_clapfirst, build_plugin_docker_jucestyle ]
needs: [ build_plugin, build_plugin_docker ]
steps:
- name: Upload to Nightly
uses: surge-synthesizer/sst-githubactions/upload-to-release@main
Expand All @@ -148,7 +132,7 @@ jobs:
name: Publish scxt Release
if: startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'surge-synthesizer'
runs-on: ubuntu-latest
needs: [ build_plugin, build_plugin_docker_clapfirst, build_plugin_docker_jucestyle ]
needs: [ build_plugin, build_plugin_docker ]
steps:
- name: Upload to Release
uses: surge-synthesizer/sst-githubactions/upload-to-release@main
Expand Down

0 comments on commit 2c54f96

Please sign in to comment.