threaded-dir-scan #854
Workflow file for this run
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: Validate PR | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
cancel-old-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
config: [debug, release] | |
target: [static_lib, shared_lib, cmd] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build ${{matrix.target}} | |
run: | | |
${{matrix.target}}/build.sh ${{matrix.config}} | |
- uses: actions/upload-artifact@v3 | |
name: upload ${{matrix.target}} | |
with: | |
name: linux_x64-${{matrix.target}}-${{matrix.config}} | |
path: | | |
build/** | |
!build/**/*.o | |
!build/**/third-party/** | |
test-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
config: [debug, release] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build test | |
run: | | |
test/build.sh ${{matrix.config}} | |
- name: run tests | |
run: | | |
cd ./test | |
../build/linux_x64/test/${{matrix.config}}/test | |
cd .. | |
dist-linux: | |
needs: build-linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
path: build/artifacts | |
- name: build dist | |
run: | | |
./dist.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist-linux-x64 | |
path: dist | |
build-darwin: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
config: [debug, release] | |
target: [static_lib, shared_lib, cmd] | |
arch: [x64, arm64] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build ${{matrix.target}} | |
run: | | |
${{matrix.target}}/build.sh ${{matrix.config}} ${{matrix.arch}} | |
- uses: actions/upload-artifact@v3 | |
name: upload ${{matrix.target}} | |
with: | |
name: darwin_${{matrix.arch}}-${{matrix.target}}-${{matrix.config}} | |
path: | | |
build/** | |
!build/**/*.o | |
!build/**/third-party/** | |
test-darwin: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
config: [debug, release] | |
arch: [arm64, x64] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build test | |
run: | | |
test/build.sh ${{matrix.config}} ${{matrix.arch}} | |
- name: run tests | |
if: ${{ matrix.arch == 'x64' }} | |
run: | | |
cd ./test | |
../build/darwin_${{matrix.arch}}/test/${{matrix.config}}/test | |
cd .. | |
dist-darwin: | |
needs: build-darwin | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
arch: [x64, arm64] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
path: build/artifacts | |
- name: build dist | |
run: | | |
./dist.sh ${{matrix.arch}} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist-darwin-${{matrix.arch}} | |
path: dist | |
build-win32: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
config: [debug, release] | |
target: [static_lib, shared_lib, cmd] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build ${{matrix.target}} | |
run: | | |
${{matrix.target}}/build.bat ${{matrix.config}} | |
- uses: actions/upload-artifact@v3 | |
name: upload ${{matrix.target}} | |
with: | |
name: win32_x64-${{matrix.target}}-${{matrix.config}} | |
path: | | |
build/** | |
!build/**/*.obj | |
!build/**/*.o | |
!build/**/third-party/** | |
test-win32: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
config: [debug, release] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build test | |
run: | | |
test/build.bat ${{matrix.config}} | |
- name: run tests | |
run: | | |
cd ./test | |
../build/win32_x64/test/${{matrix.config}}/test.exe | |
cd .. | |
dist-win32: | |
needs: build-win32 | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
path: build/artifacts | |
- name: build dist | |
run: | | |
./dist.bat | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist-win32-x64 | |
path: dist |