1
0
mirror of https://github.com/alkoleft/yaxunit-addin.git synced 2024-12-12 08:23:54 +02:00
yaxunit-addin/.github/workflows/build.yml
2023-08-29 19:00:31 +03:00

115 lines
2.9 KiB
YAML

name: build
on:
push:
jobs:
build-win-x86:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v2
with:
arch: x86
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=Release
-A Win32
- name: Build
run: cmake --build ${{github.workspace}}/build --parallel --config Release
- uses: actions/upload-artifact@v3
with:
name: windows-x86
path: ${{github.workspace}}/build/Release/*AddIn.dll
build-win-x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v2
with:
arch: x64
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=Release
-A x64
- name: Build
run: cmake --build ${{github.workspace}}/build --parallel --config Release
- uses: actions/upload-artifact@v3
with:
name: windows-x64
path: ${{github.workspace}}/build/Release/*AddIn.dll
build-lin-x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install gcc
run: sudo apt install g++-10 -y
- name: Install Ninja
uses: ashutoshvarma/setup-ninja@master
with:
version: 1.11.0
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -GNinja -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build ${{github.workspace}}/build --parallel
- uses: actions/upload-artifact@v3
with:
name: linux-x64
path: ${{github.workspace}}/build/*AddIn.so
build-package:
needs: [build-win-x86, build-win-x64, build-lin-x64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Download linux-x64
uses: actions/download-artifact@v3
with:
name: linux-x64
path: linux-x64
- name: Download windows-x86
uses: actions/download-artifact@v3
with:
name: windows-x86
path: windows-x86
- name: Download windows-x64
uses: actions/download-artifact@v3
with:
name: windows-x64
path: windows-x64
- name: Build bundle
run: |
mv ./linux-x64/YaxUnitAddIn.so ./bundle/YaxUnitAddIn-x64.so
mv ./windows-x86/YaxUnitAddIn.dll ./bundle/YaxUnitAddIn-x86.dll
mv ./windows-x64/YaxUnitAddIn.dll ./bundle/YaxUnitAddIn-x64.dll
- uses: actions/upload-artifact@v3
with:
name: bundle
path: ${{github.workspace}}/bundle/*