Skip to content

Commit

Permalink
Merge pull request #64 from chenrui333/update-workflow
Browse files Browse the repository at this point in the history
Add CI for PR builds and improve workflows a bit
  • Loading branch information
chenrui333 committed Feb 21, 2024
2 parents 9c84780 + 68babc8 commit 8d07a3c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 47 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: build release artifacts

on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build-linux-macos:
Expand All @@ -11,25 +17,26 @@ jobs:
os: ['ubuntu-latest', 'macos-latest']
fail-fast: false
steps:
- uses: actions/checkout@v2
- 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
uses: actions/upload-artifact@v3
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: release-packages
path: ./build/sqlcheck-x86_64.*
Expand All @@ -41,7 +48,7 @@ jobs:
os: ['windows-latest']
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
Expand All @@ -54,13 +61,14 @@ jobs:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
msbuild ALL_BUILD.vcxproj /t:Build /p:Configuration=Release
msbuild ALL_BUILD.vcxproj /t:Build /p:Configuration=Release
- name: run tests
run: ./build/test/Release/test_suite.exe

- name: upload artifacts
uses: actions/upload-artifact@v3
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: release-packages
path: ./build/bin/Release/sqlcheck.*
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

0 comments on commit 8d07a3c

Please sign in to comment.