diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..2f7be95 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,39 @@ +name: Linux + +on: + pull_request: + push: + release: + types: [published] + +jobs: + build_linux: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + configuration: [Debug, Release] + architecture: [x64] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y gcc-12 g++-12 + + - name: Configure + run: | + export CC=gcc-12 && export CXX=g++-12 + cmake -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} + + - name: Build + working-directory: build + run: | + make -j$(nproc) + + - name: Test + working-directory: build + run: | + ctest diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000..1dd37bb --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,33 @@ +name: MacOS + +on: + pull_request: + push: + release: + types: [published] + +jobs: + build_macos: + runs-on: macos-12 + strategy: + fail-fast: false + matrix: + configuration: [Debug, Release] + architecture: [x64] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Configure + run: | + cmake -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} + + - name: Build + working-directory: build + run: | + make -j$(sysctl -n hw.logicalcpu) + + - name: Test + working-directory: build + run: | + ctest diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..00f8ccf --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,42 @@ +name: Windows + +on: + pull_request: + push: + release: + types: [published] + +jobs: + build_windows: + runs-on: windows-2022 + strategy: + fail-fast: false + matrix: + configuration: [Debug, Release] + architecture: [x64] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup environment + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.architecture }} + + - name: Setup ninja + uses: seanmiddleditch/gha-setup-ninja@v3 + + - name: Configure + run: | + cmake -B build -G "Ninja" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} + + - name: Build + working-directory: build + shell: cmd + run: | + ninja + + - name: Test + working-directory: build + run: | + ctest