feat(github): CI linux build (#81)

This commit is contained in:
Edo 2023-02-27 22:14:27 +00:00 committed by GitHub
parent fc1ddeb4e7
commit 89a6429913

View File

@ -28,14 +28,14 @@ jobs:
platform: x64 platform: x64
steps: steps:
- name: Check out files - name: Check out files
uses: actions/checkout@v3 uses: actions/checkout@v3.3.0
with: with:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
lfs: false lfs: false
- name: Add msbuild to PATH - name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1.3 uses: microsoft/setup-msbuild@v1.3.1
- name: Generate project files - name: Generate project files
run: cmd /C call prebuild-windows.bat run: cmd /C call prebuild-windows.bat
@ -47,7 +47,7 @@ jobs:
run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} build/gsc-tool.sln run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} build/gsc-tool.sln
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries - name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries
uses: actions/upload-artifact@v3.1.0 uses: actions/upload-artifact@v3.1.2
with: with:
name: Windows ${{matrix.configuration}} ${{matrix.arch}} binaries name: Windows ${{matrix.configuration}} ${{matrix.arch}} binaries
path: | path: |
@ -77,7 +77,7 @@ jobs:
platform: arm64 platform: arm64
steps: steps:
- name: Check out files - name: Check out files
uses: actions/checkout@v3 uses: actions/checkout@v3.3.0
with: with:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
@ -94,8 +94,53 @@ jobs:
pushd build pushd build
make config=${{matrix.config}}_${{matrix.platform}} -j$(sysctl -n hw.logicalcpu) make config=${{matrix.config}}_${{matrix.platform}} -j$(sysctl -n hw.logicalcpu)
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries - name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries
uses: actions/upload-artifact@v3.1.0 uses: actions/upload-artifact@v3.1.2
with: with:
name: macOS ${{matrix.configuration}} ${{matrix.arch}} binaries name: macOS ${{matrix.configuration}} ${{matrix.arch}} binaries
path: | path: |
build/bin/${{matrix.platform}}/${{matrix.configuration}}/gsc-tool build/bin/${{matrix.platform}}/${{matrix.configuration}}/gsc-tool
build-lin:
name: Build Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
configuration:
- debug
- release
arch:
- x64
include:
- configuration: debug
config: debug
- configuration: release
config: release
steps:
- uses: rui314/setup-mold@staging
- name: Check out files
uses: actions/checkout@v3.3.0
with:
submodules: true
fetch-depth: 0
lfs: false
- name: Generate project files
run: ./prebuild-linux.sh
- name: Set up problem matching
uses: ammaraskar/gcc-problem-matcher@master
- name: Build ${{matrix.configuration}} ${{matrix.arch}} binaries
run: |
pushd build
make config=${{matrix.config}}_${{matrix.arch}} -j$(nproc)
env:
CC: clang
CXX: clang++
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries
uses: actions/upload-artifact@v3.1.2
with:
name: Linux ${{matrix.configuration}} ${{matrix.arch}} binaries
path: |
build/bin/${{matrix.platform}}/${{matrix.configuration}}/gsc-tool