rename workflow to main #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
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/setup-msbuild@v1.1 | |
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.* |