Skip to content

Commit

Permalink
Try to factor workflow components a bit - step one (#135)
Browse files Browse the repository at this point in the history
Move the prep and clang-format steps to sst-githubactions
  • Loading branch information
baconpaul authored Jul 27, 2024
1 parent 251105d commit da04f1a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 45 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Build Pull Request
on:
pull_request:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

defaults:
run:
shell: bash
Expand All @@ -25,25 +22,12 @@ jobs:
with:
submodules: recursive

- name: Select Xcode Version
if: runner.os == 'macOS'
run: sudo xcode-select -switch /Applications/Xcode_15.1.app


- name: Install Linux Deps; pick GCC12
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt install libasound2-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev libfreetype6-dev libglu1-mesa-dev libjack-jackd2-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
- name: Prepare for JUCE
uses: surge-synthesizer/sst-githubactions/prepare-for-juce@main
with:
os: ${{ runner.os }}

- name: Build pull request version
if: github.event_name == 'pull_request'
run: |
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Debug
cmake --build ./build --config Debug --target monique-staged --parallel 3
- name: Show Build Directory
run: |
ls -l ./build
25 changes: 7 additions & 18 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,17 @@ jobs:
with:
submodules: recursive

- name: Select Xcode Version
if: runner.os == 'macOS'
run: sudo xcode-select -switch /Applications/Xcode_15.1.app

- uses: apple-actions/import-codesign-certs@v3
if: runner.os == 'macOS'
with:
p12-file-base64: ${{ secrets.MAC_CERTS_P12 }}
p12-password: ${{ secrets.CERT_PWD }}

- name: Install Linux Deps; pick GCC9
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt install libasound2-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev libfreetype6-dev libglu1-mesa-dev libjack-jackd2-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
- name: Prepare for JUCE
uses: surge-synthesizer/sst-githubactions/prepare-for-juce@main
with:
os: ${{ runner.os }}


- name: Build release version
run: |
Expand All @@ -61,12 +55,7 @@ jobs:
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cmake --build ./build --config Release --target monique-installer --parallel 3

- name: Show Build Directory
run: |
ls -l ./build
- name: Show Installer Directory
if: github.event_name != 'pull_request'
run: |
ls -l ./build/installer
Expand All @@ -80,10 +69,10 @@ jobs:
uses: actions/upload-artifact@v4
with:
path: build/installer
name: Nightly-${{ matrix.os }}
name: build-${{ matrix.os }}

publish-monique-nightly:
name: Publish Monique
name: Publish Monique Nightly
# only create a release if a tag was created that is called e.g. v1.2.3
# see also https://vcvrack.com/manual/Manifest#version
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'surge-synthesizer' }}
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
path:
- 'src'
# - 'include'
path: [ 'src']
steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3

- name: Run clang-format style check
uses: jidicula/clang-format-[email protected]
uses: surge-synthesizer/sst-githubactions/clang-format-check@main
with:
clang-format-version: '17'
check-path: ${{ matrix.path }}
path: ${{ matrix.path }}

0 comments on commit da04f1a

Please sign in to comment.