Skip to content

Commit

Permalink
add macos CD release job
Browse files Browse the repository at this point in the history
  • Loading branch information
bencwallace committed Jun 11, 2024
1 parent bfde7e2 commit b1bdd75
Showing 1 changed file with 35 additions and 9 deletions.
44 changes: 35 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@ on:
- "v*.*.*"

jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
artifact-suffix: linux-x86_64
runs-on: ${{matrix.os}}
release-ubuntu:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
Expand All @@ -28,9 +23,40 @@ jobs:
- name: Build
run: |
cmake --build ${{github.workspace}}/build --config Release --target pivot_exec -j
tar vczf ${{github.workspace}}/build/pivot-${{matrix.artifact-suffix}}.tar.gz -C ${{github.workspace}}/build pivot libpivot.a
tar vczf ${{github.workspace}}/build/pivot-linux-x86_64.tar.gz -C ${{github.workspace}}/build pivot libpivot.a
- name: Release
uses: softprops/action-gh-release@v2
with:
files: ${{github.workspace}}/build/pivot-${{matrix.artifact-suffix}}.tar.gz
files: ${{github.workspace}}/build/pivot-linux-x86_64.tar.gz

release-macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: InstallDeps
run: brew install bison boost

- name: InstallGraphviz
run: |
git clone https://gitlab.com/graphviz/graphviz.git
cmake -S ${{github.workspace}}/graphviz -B ${{github.workspace}}/graphviz/build \
-DCMAKE_BUILD_TYPE=Release \
-DBISON_EXECUTABLE=$(brew --prefix bison)/bin/bison \
-DCMAKE_INSTALL_PREFIX=~/.local
cmake --build ${{github.workspace}}/graphviz/build --target install -j
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DGRAPHVIZ_INCLUDE_PATH=~/.local/include/graphviz

- name: Build
run: |
cmake --build ${{github.workspace}}/build --config Release --target test_pivot -j
tar vczf ${{github.workspace}}/build/pivot-macos.tar.gz -C ${{github.workspace}}/build pivot libpivot.a
- name: Release
uses: softprops/action-gh-release@v2
with:
files: ${{github.workspace}}/build/pivot-macos.tar.gz

0 comments on commit b1bdd75

Please sign in to comment.