Skip to content

Add CI for PR builds and improve workflows a bit #10

Add CI for PR builds and improve workflows a bit

Add CI for PR builds and improve workflows a bit #10

Workflow file for this run

name: build release artifacts
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-linux-macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: run build
run: |
git submodule update --init --recursive
mkdir build
cd build && cmake -DCMAKE_BUILD_TYPE=RELEASE ..
make
- name: run tests
run: ./build/test/test_suite
- name: create release artifacts/packages
run: |
cd build
make package
- name: upload artifacts
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: release-packages
path: ./build/sqlcheck-x86_64.*
build-windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['windows-latest']
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/[email protected]
with:
msbuild-architecture: x64
- name: run build
run: |
git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
msbuild ALL_BUILD.vcxproj /t:Build /p:Configuration=Release
- name: run tests
run: ./build/test/Release/test_suite.exe
- name: upload artifacts
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: release-packages
path: ./build/bin/Release/sqlcheck.*