From 644d92c301dd425c36ffc75e06b79df81f96138d Mon Sep 17 00:00:00 2001 From: Geolm Date: Fri, 19 Jan 2024 09:38:50 -0500 Subject: [PATCH] automatic build/test action --- .github/workflows/cmake-multi-platform.yml | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/cmake-multi-platform.yml diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml new file mode 100644 index 0000000..6f4aa1b --- /dev/null +++ b/.github/workflows/cmake-multi-platform.yml @@ -0,0 +1,61 @@ +name: C/C++ CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build-ubuntu-clang: + name: ubuntu-clang + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Configure CMake + run: cmake ${{github.workspace}}/tests/ -DCMAKE_C_COMPILER=clang + + - name: Build + run: cmake --build ${{github.workspace}}/ + + - name: Test + working-directory: ${{github.workspace}}/ + run: ./tests + + build-macos: + name: macos + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + + - name: Configure CMake + run: cmake ${{github.workspace}}/tests/ + + - name: Build + run: cmake --build ${{github.workspace}}/ + + - name: Test + working-directory: ${{github.workspace}}/ + run: ./tests + + build-windows: + name: windows + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Configure CMake + working-directory: ${{github.workspace}}\tests + run: cmake . + + - name: Build + working-directory: ${{github.workspace}}\tests + run: cmake --build . + + - name: Test + working-directory: ${{github.workspace}}\tests\Debug + run: ./tests