Skip to content

CI

CI #293

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types: [published]
schedule:
- cron: '0 6 * * SAT'
jobs:
format:
runs-on: ubuntu-latest
env:
CXX: 'clang++'
steps:
- uses: actions/checkout@v1
- name: configure
run: cmake -H. -Bbuild/
- name: lint
run: cd build && ctest --output-on-failure -R ^test.format
gcc:
needs: [format]
runs-on: ubuntu-latest
env:
CXX: 'g++'
steps:
- uses: actions/checkout@v1
- name: install
run: sudo apt-get install -y libboost-dev cppcheck
- name: configure
run: cmake -H. -Bbuild/
- name: test
run: cd build && ctest --output-on-failure -E ^test.format
clang:
needs: [format]
runs-on: ubuntu-latest
env:
CXX: 'clang++'
steps:
- uses: actions/checkout@v1
- name: install
run: sudo apt-get install -y libboost-dev clang-tidy
- name: configure
run: cmake -H. -Bbuild/
- name: test
run: cd build && ctest --output-on-failure -E ^test.format
xcode:
needs: [format]
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: configure
run: cmake -H. -Bbuild/
- name: test
run: cd build && ctest --output-on-failure -E ^test.format
msvc:
needs: [format]
runs-on: windows-latest
env:
CXXFLAGS: '/DMETAL_TEST_GEN_LIMIT=7'
steps:
- uses: actions/checkout@v1
- name: configure
run: mkdir build; cd build; cmake ..
- name: test
run: cd build; ctest -C Release --output-on-failure -E ^test.format
doc:
needs: [gcc, clang, xcode, msvc]
runs-on: ubuntu-latest
env:
CXX: 'clang++'
steps:
- uses: actions/checkout@v1
- name: install
run: |
sudo apt-get install -y clang tree
mkdir doxygen && curl -L "https://www.doxygen.nl/files/doxygen-1.9.3.src.tar.gz" | tar --strip-components=1 -xz -C doxygen/
cmake -Hdoxygen -Bdoxygen/build
cmake --build doxygen/build -- -j
- name: configure
run: PATH=${PWD}/doxygen/build/bin:${PATH} cmake -H. -Bbuild/ -DCMAKE_INSTALL_PREFIX=${PWD}/install/
- name: test
run: (! cmake --build build/ --target doc 2>&1 | grep --color -iE "warning|error")
- name: deploy
run: cmake --build build/ --target install && tree ${PWD}/install/
- name: release
if: github.event_name == 'release'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: install/share/Metal/doc
standalone:
needs: [gcc, clang, xcode, msvc]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install
run: sudo apt-get install -y tree
- name: configure
run: cmake -H. -Bbuild/ -DCMAKE_INSTALL_PREFIX=${PWD}/install/
- name: deploy
run: cmake --build build/ --target install && tree ${PWD}/install/
- name: release
if: github.event_name == 'release'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: standalone
FOLDER: install/include