2024-05-10 18:19:30 +08:00

94 lines
3.1 KiB
YAML

# https://docs.github.com/en/actions/learn-github-actions/contexts
---
name: SignerServer
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
windows:
name: run on ${{ matrix.os }}(${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
arch: [x64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup cmake
uses: lukka/get-cmake@latest
- name: Build project
uses: lukka/run-cmake@v10
with:
# This is the default path to the CMakeLists.txt along side the
# CMakePresets.json. Change if you need have CMakeLists.txt and CMakePresets.json
# located elsewhere.
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
# This is the name of the CMakePresets.json's configuration to use to generate
# the project files. This configuration leverages the vcpkg.cmake toolchain file to
# run vcpkg and install all dependencies specified in vcpkg.json.
configurePreset: 'msvc-${{ matrix.arch }}'
# This is the name of the CMakePresets.json's configuration to build the project.
buildPreset: 'msvc-${{ matrix.arch }}-release'
- run: mv build/msvc-${{ matrix.arch }}/Release/SignerServer.dll SignerServer.dll
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: SignerServer-${{ matrix.os }}-${{ matrix.arch }}
path: |
SignerServer.dll
load.js
start.sh
ubuntu:
name: run on ${{ matrix.os }}(${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
arch: [x64, arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup cmake
uses: lukka/get-cmake@latest
- name: Build project
uses: lukka/run-cmake@v10
with:
# This is the default path to the CMakeLists.txt along side the
# CMakePresets.json. Change if you need have CMakeLists.txt and CMakePresets.json
# located elsewhere.
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
# This is the name of the CMakePresets.json's configuration to use to generate
# the project files. This configuration leverages the vcpkg.cmake toolchain file to
# run vcpkg and install all dependencies specified in vcpkg.json.
configurePreset: 'ninja'
# This is the name of the CMakePresets.json's configuration to build the project.
buildPreset: 'ninja-release'
- run: mv build/ninja/libSignerServer.so libSignerServer.so
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: SignerServer-${{ matrix.os }}-${{ matrix.arch }}
path: |
libSignerServer.so
load.js
start.sh