Skip to content

batch jobs in Longtail_ChangeVersion2 (#231) #212

batch jobs in Longtail_ChangeVersion2 (#231)

batch jobs in Longtail_ChangeVersion2 (#231) #212

Workflow file for this run

name: Build Master
on:
push:
branches: [ main ]
jobs:
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: [arm64, x64]
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: [arm64, x64]
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