From 502015b6e117e7c52fd143025856f9b5b242b6d6 Mon Sep 17 00:00:00 2001 From: Simon Owen Date: Thu, 1 Sep 2022 13:41:00 +0100 Subject: [PATCH] Added GitHub actions for CI builds These build the default project configuration across a selection of common platform and tool versions. --- .github/workflows/linux-ci.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/macos-ci.yml | 22 ++++++++++++++++++++++ .github/workflows/windows-ci.yml | 29 +++++++++++++++++++++++++++++ .gitignore | 2 +- 4 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/linux-ci.yml create mode 100644 .github/workflows/macos-ci.yml create mode 100644 .github/workflows/windows-ci.yml diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml new file mode 100644 index 0000000..e1c52d3 --- /dev/null +++ b/.github/workflows/linux-ci.yml @@ -0,0 +1,28 @@ +name: Linux CI + +on: [workflow_dispatch, push, pull_request] + +jobs: + build: + runs-on: ${{matrix.os}} + + strategy: + matrix: + os: [ ubuntu-22.04, ubuntu-20.04 ] + compiler: + - { cc: "gcc", cxx: "g++" } + - { cc: "clang", cxx: "clang++" } + + steps: + - uses: actions/checkout@v3 + + - name: Configure + run: cmake -B ${{github.workspace}}/build + env: + CC: ${{matrix.cc}} + CXX: ${{matrix.cxx}} + + - name: Build + run: cmake --build ${{github.workspace}}/build + env: + MAKEFLAGS: "-j2" diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml new file mode 100644 index 0000000..a9a1273 --- /dev/null +++ b/.github/workflows/macos-ci.yml @@ -0,0 +1,22 @@ +name: macOS CI + +on: [workflow_dispatch, push, pull_request] + +jobs: + build: + runs-on: ${{matrix.os}} + + strategy: + matrix: + os: [ macos-12, macos-11, macos-10.15 ] + + steps: + - uses: actions/checkout@v3 + + - name: Configure + run: cmake -B ${{github.workspace}}/build + + - name: Build + run: cmake --build ${{github.workspace}}/build + env: + MAKEFLAGS: "-j3" diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml new file mode 100644 index 0000000..e193be9 --- /dev/null +++ b/.github/workflows/windows-ci.yml @@ -0,0 +1,29 @@ +name: Windows CI + +on: [workflow_dispatch, push, pull_request] + +jobs: + build: + runs-on: windows-2022 + + strategy: + matrix: + config: + - { vs: "17 2022", arch: "Win32", triplet: "x86-windows" } + - { vs: "17 2022", arch: "x64", triplet: "x64-windows" } + + steps: + - uses: actions/checkout@v3 + + - name: Set up Visual Studio shell + uses: egor-tensin/vs-shell@v2 + with: + arch: ${{matrix.config.arch}} + + - name: Configure + shell: cmd + run: cmake -B ${{github.workspace}}/build -G "Visual Studio ${{matrix.config.vs}}" -A "${{matrix.config.arch}}" + + - name: Build + shell: cmd + run: cmake --build ${{github.workspace}}/build diff --git a/.gitignore b/.gitignore index e36fc2b..177fed4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ .* !.gitignore -!.travis.yml +!.github Thumbs.db /out /CMakeSettings.json