Skip to content

Commit

Permalink
Merge pull request guillaumeblanc#127 from guillaumeblanc/feature/wor…
Browse files Browse the repository at this point in the history
…kflow

Splits workflow per platform
  • Loading branch information
guillaumeblanc authored Aug 18, 2021
2 parents b38c22d + 869fa15 commit 924abf3
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 67 deletions.
90 changes: 26 additions & 64 deletions .github/workflows/main.yml → .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,95 +1,76 @@
name: build_and_test
name: Linux
on: [push, pull_request]
jobs:
build:
runs-on: ${{matrix.os}}
runs-on: ubuntu-latest
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
build_type: [Debug]
option: [default, ref, shared, no_sample, no_data, no_fbx, no_gltf, no_tests]
include:
- os: macos-latest
build_type: Release
- build_type: Release
option: default
- os: windows-latest
build_type: Release
option: default
- os: ubuntu-latest
build_type: Release
option: default
- os: ubuntu-latest
build_type: Debug
- build_type: Debug
option: gcc7
compiler_c: gcc-7
compiler_cxx: g++-7
- os: ubuntu-latest
build_type: Debug
- build_type: Debug
option: gcc8
compiler_c: gcc-8
compiler_cxx: g++-8
- os: ubuntu-latest
build_type: Debug
option: default
- build_type: Debug
option: gcc9
compiler_c: gcc-9
compiler_cxx: g++-9
- os: ubuntu-latest
build_type: Debug
option: default
- build_type: Debug
option: gcc10
compiler_c: gcc-10
compiler_cxx: g++-10
- os: ubuntu-latest
build_type: Debug
option: default
- build_type: Debug
option: gcc11
compiler_c: gcc-11
compiler_cxx: g++-11
- os: ubuntu-latest
build_type: Debug
option: default
- build_type: Debug
option: clang7
compiler_c: clang-7
compiler_cxx: clang++-7
- os: ubuntu-latest
build_type: Debug
- build_type: Debug
option: clang8
compiler_c: clang-8
compiler_cxx: clang++-8
- os: ubuntu-latest
build_type: Debug
option: default
- build_type: Debug
option: clang9
compiler_c: clang-9
compiler_cxx: clang++-9
- os: ubuntu-latest
build_type: Debug
option: default
- build_type: Debug
option: clang10
compiler_c: clang-10
compiler_cxx: clang++-10
- os: ubuntu-latest
build_type: Debug
option: default
- build_type: Debug
option: clang11
compiler_c: clang-11
compiler_cxx: clang++-11

steps:
- uses: actions/checkout@v2

- name: Install OpenGL dependency
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
- name: Install c compiler
if: matrix.os == 'ubuntu-latest' && matrix.compiler_c
if: matrix.compiler_c
run: |
sudo apt-get install ${{matrix.compiler_c}}
- name: Install cxx compiler
if: matrix.os == 'ubuntu-latest' && matrix.compiler_cxx
if: matrix.compiler_cxx
run: |
sudo apt-get install ${{matrix.compiler_cxx}}
- name: Install linux fbx sdk
if: matrix.option != 'no_fbx' && matrix.os == 'ubuntu-latest'
- name: Install fbx sdk
if: matrix.option != 'no_fbx'
run: |
mkdir fbx
cd fbx
Expand All @@ -100,25 +81,6 @@ jobs:
sudo chmod -R 755 /usr/local/include
cd ..
- name: Install windows fbx sdk
if: matrix.option != 'no_fbx' && matrix.os == 'windows-latest'
run: |
md fbx
cd fbx
Start-BitsTransfer -Source 'https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/2020-2/fbx20202_fbxsdk_vs2019_win.exe' -Destination 'fbxsdk.exe'
Start-Process -FilePath 'fbxsdk.exe' /S -Wait
cd ..
- name: Install macos fbx sdk
if: matrix.option != 'no_fbx' && matrix.os == 'macos-latest'
run: |
mkdir fbx
cd fbx
sudo wget 'https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/2020-2/fbx20202_fbxsdk_clang_mac.pkg.tgz' -O 'fbx.tgz'
sudo tar -xf 'fbx.tgz'
sudo installer -pkg *_fbxsdk_clang_macos.pkg -target /
cd ..
- name: Configure
# Configure CMake in a 'build' subdirectory.
run: |
Expand All @@ -131,10 +93,10 @@ jobs:

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} --use-stderr
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} --use-stderr -- -j4

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
run: ctest -C ${{matrix.build_type}} --output-on-failure
run: ctest -C ${{matrix.build_type}} --output-on-failure -- -j2

40 changes: 40 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: macOS
on: [push, pull_request]
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
build_type: [Debug]
option: [default, ref, shared, no_fbx]
include:
- build_type: Release
option: default
steps:
- uses: actions/checkout@v2

- name: Install fbx sdk
if: matrix.option != 'no_fbx'
run: |
mkdir fbx
cd fbx
sudo wget 'https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/2020-2/fbx20202_fbxsdk_clang_mac.pkg.tgz' -O 'fbx.tgz'
sudo tar -xf 'fbx.tgz'
sudo installer -pkg *_fbxsdk_clang_macos.pkg -target /
cd ..
- name: Configure
# Configure CMake in a 'build' subdirectory.
run: |
cmake --version
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.option == 'shared'}} -Dozz_build_tests=${{matrix.option != 'no_tests'}} -Dozz_build_simd_ref=${{matrix.option == 'ref'}} -Dozz_build_samples=${{matrix.option != 'no_sample'}} -Dozz_build_data=${{matrix.option != 'no_data'}} -Dozz_build_gltf=${{matrix.option != 'no_gltf'}}
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} --use-stderr -- -j4

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
run: ctest -C ${{matrix.build_type}} --output-on-failure -- -j2

38 changes: 38 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Windows
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
build_type: [Debug]
option: [default, ref, shared, no_fbx]
include:
- build_type: Release
option: default
steps:
- uses: actions/checkout@v2

- name: Install fbx sdk
if: matrix.option != 'no_fbx'
run: |
md fbx
cd fbx
Start-BitsTransfer -Source 'https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/2020-2/fbx20202_fbxsdk_vs2019_win.exe' -Destination 'fbxsdk.exe'
Start-Process -FilePath 'fbxsdk.exe' /S -Wait
cd ..
- name: Configure
# Configure CMake in a 'build' subdirectory.
run: |
cmake --version
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.option == 'shared'}} -Dozz_build_tests=${{matrix.option != 'no_tests'}} -Dozz_build_simd_ref=${{matrix.option == 'ref'}} -Dozz_build_samples=${{matrix.option != 'no_sample'}} -Dozz_build_data=${{matrix.option != 'no_data'}} -Dozz_build_gltf=${{matrix.option != 'no_gltf'}}
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} --use-stderr

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
run: ctest -C ${{matrix.build_type}} --output-on-failure
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Samples, tools and tests depend on external libraries (glfw, tinygltf, Fbx SDK,
Build status
------------

| | Linux | Mac OS | Windows |
| | Linux | macOS | Windows |
| ------- | ------ | ------ | ------- |
| master | [![Travis-CI](https://travis-ci.org/guillaumeblanc/ozz-animation.svg?branch=master)](http://travis-ci.org/guillaumeblanc/ozz-animation) | [![Travis-CI](https://travis-ci.org/guillaumeblanc/ozz-animation.svg?branch=master)](http://travis-ci.org/guillaumeblanc/ozz-animation) | [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/guillaumeblanc/ozz-animation?branch=master&svg=true)](http://ci.appveyor.com/project/guillaumeblanc/ozz-animation) |
| develop | [![Travis-CI](https://travis-ci.org/guillaumeblanc/ozz-animation.svg?branch=develop)](http://travis-ci.org/guillaumeblanc/ozz-animation) | [![Travis-CI](https://travis-ci.org/guillaumeblanc/ozz-animation.svg?branch=develop)](http://travis-ci.org/guillaumeblanc/ozz-animation) | [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/guillaumeblanc/ozz-animation?branch=develop&svg=true)](http://ci.appveyor.com/project/guillaumeblanc/ozz-animation) |
| master | [![Linux](https://github.com/guillaumeblanc/ozz-animation/actions/workflows/linux.yml/badge.svg?branch=master)](https://github.com/guillaumeblanc/ozz-animation/actions/workflows/linux.yml) | [![macOS](https://github.com/guillaumeblanc/ozz-animation/actions/workflows/macos.yml/badge.svg?branch=master)](https://github.com/guillaumeblanc/ozz-animation/actions/workflows/macos.yml) | [![Windows](https://github.com/guillaumeblanc/ozz-animation/actions/workflows/windows.yml/badge.svg?branch=master)](https://github.com/guillaumeblanc/ozz-animation/actions/workflows/windows.yml) |
| develop | [![Linux](https://github.com/guillaumeblanc/ozz-animation/actions/workflows/linux.yml/badge.svg?branch=develop)](https://github.com/guillaumeblanc/ozz-animation/actions/workflows/linux.yml) | [![macOS](https://github.com/guillaumeblanc/ozz-animation/actions/workflows/macos.yml/badge.svg?branch=develop)](https://github.com/guillaumeblanc/ozz-animation/actions/workflows/macos.yml) | [![Windows](https://github.com/guillaumeblanc/ozz-animation/actions/workflows/windows.yml/badge.svg?branch=develop)](https://github.com/guillaumeblanc/ozz-animation/actions/workflows/windows.yml) |

The dashboard for all branches is available [here](http://guillaumeblanc.github.io/ozz-animation/documentation/dashboard/).

Expand Down

0 comments on commit 924abf3

Please sign in to comment.