Skip to content

Commit

Permalink
A seperate workflow per OS
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosink committed Nov 1, 2023
1 parent e2f470b commit f0ef486
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build on Linux

on: [push, pull_request]

Expand All @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
os: [ubuntu-latest]
build_type: [Debug, Release]
env:
build_dir: "build"
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/build.Windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build on Windows

on: [push, pull_request]

jobs:
build:
name: Build ${{ matrix.os }} ${{ matrix.build_type }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
build_type: [Debug, Release]
env:
build_dir: "build"
steps:
- name: Install dependencies
shell: bash
run: |
if [[ "${{ runner.os }}" == "Linux" ]] ; then
sudo apt-get update && sudo apt-get install libglu1-mesa-dev xorg-dev
fi
- uses: actions/checkout@v3
with:
submodules: recursive
- name: CMake
shell: bash
run: |
if [[ "${{ runner.os }}" == "Windows" ]] ; then
cmake . -B ${{ env.build_dir }}
else
cmake . -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
fi
- name: Build
working-directory: ${{ env.build_dir }}
shell: bash
run: |
if [[ "${{ runner.os }}" == "Windows" ]] ; then
cmake --build . --config ${{ matrix.build_type }} --target ALL_BUILD --verbose -j
else
cmake --build . --target all --verbose -j
fi
42 changes: 42 additions & 0 deletions .github/workflows/build.macOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build on macOS

on: [push, pull_request]

jobs:
build:
name: Build ${{ matrix.os }} ${{ matrix.build_type }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
build_type: [Debug, Release]
env:
build_dir: "build"
steps:
- name: Install dependencies
shell: bash
run: |
if [[ "${{ runner.os }}" == "Linux" ]] ; then
sudo apt-get update && sudo apt-get install libglu1-mesa-dev xorg-dev
fi
- uses: actions/checkout@v3
with:
submodules: recursive
- name: CMake
shell: bash
run: |
if [[ "${{ runner.os }}" == "Windows" ]] ; then
cmake . -B ${{ env.build_dir }}
else
cmake . -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
fi
- name: Build
working-directory: ${{ env.build_dir }}
shell: bash
run: |
if [[ "${{ runner.os }}" == "Windows" ]] ; then
cmake --build . --config ${{ matrix.build_type }} --target ALL_BUILD --verbose -j
else
cmake --build . --target all --verbose -j
fi
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# subface

[![build](https://github.com/chaosink/subface/workflows/build/badge.svg)](https://github.com/chaosink/subface/actions/workflows/build.yml)
| Linux | macOS | Windows |
| :---: | :---: | :---: |
| [![build][1]][2] | [![build][3]][4] | [![build][5]][6] |

[1]: https://github.com/chaosink/subface/actions/workflows/build.Linux.yml/badge.svg
[2]: https://github.com/chaosink/subface/actions/workflows/build.Linux.yml
[3]: https://github.com/chaosink/subface/actions/workflows/build.macOS.yml/badge.svg
[4]: https://github.com/chaosink/subface/actions/workflows/build.macOS.yml
[5]: https://github.com/chaosink/subface/actions/workflows/build.Windows.yml/badge.svg
[6]: https://github.com/chaosink/subface/actions/workflows/build.Windows.yml

A collection of triangle mesh subdivision/tessellation/decimation implementations.

Expand Down

0 comments on commit f0ef486

Please sign in to comment.