diff --git a/.github/workflows/build-unix.yml b/.github/workflows/build-unix.yml new file mode 100644 index 0000000..f9e6b63 --- /dev/null +++ b/.github/workflows/build-unix.yml @@ -0,0 +1,62 @@ +name: build + +on: + push: + branches: [master] + pull_request: + types: [opened, synchronize, reopened] + +jobs: + debug: + name: ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + - os: ubuntu-latest + arch: x64 + - os: ubuntu-latest + arch: x86 + - os: macos-latest + arch: x64 + - os: macos-latest + arch: x86 + steps: + - uses: actions/checkout@v2 + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=DEBUG + + - name: Build + working-directory: ${{runner.workspace}}/build + shell: bash + # Execute the build. You can specify a specific target with "--target " + run: | + cmake --build . --config DEBUG + + release: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + + steps: + - uses: actions/checkout@v1 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=RELEASE + + - name: Build + working-directory: ${{runner.workspace}}/build + shell: bash + # Execute the build. You can specify a specific target with "--target " + run: | + cmake --build . --config RELEASE