Skip to content

Commit 669c4e4

Browse files
author
dr.abc
committed
update build file
1 parent 6460e47 commit 669c4e4

File tree

2 files changed

+72
-28
lines changed

2 files changed

+72
-28
lines changed

Diff for: .github/workflows/lib.yml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Build Lib
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
os: [ubuntu, windows, macos]
14+
runs-on: ${{ matrix.os }}-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Configure CMake
20+
run: cd ${{github.workspace}}/silkcodec && cmake -B ${{github.workspace}}/silkcodec/build
21+
22+
- name: CMake
23+
run: cd ${{github.workspace}}/silkcodec/build && cmake ..
24+
25+
- name: Make
26+
if: matrix.os != 'windows'
27+
run: cd ${{github.workspace}}/silkcodec/build && make
28+
29+
- uses: microsoft/setup-msbuild@v2
30+
if: matrix.os == 'windows'
31+
32+
- name: MSBuild
33+
if: matrix.os == 'windows'
34+
run: msbuild /m /p:Configuration=Release ${{github.workspace}}/silkcodec/build/silk-codec.sln
35+
36+
- name: Setup dotnet
37+
uses: actions/setup-dotnet@v4
38+
if: matrix.os == 'ubuntu'
39+
with:
40+
dotnet-version: '8.0.x'
41+
42+
- name: Dotnet publish
43+
if: matrix.os == 'ubuntu'
44+
run: cd ${{github.workspace}}/SilkSharp && dotnet publish -c Release
45+
46+
- uses: actions/upload-artifact@v4
47+
if: matrix.os == 'macos'
48+
with:
49+
name: libsilkcodec.dylib
50+
path: ${{github.workspace}}/silkcodec/build/libsilkcodec.dylib
51+
52+
- uses: actions/upload-artifact@v4
53+
if: matrix.os == 'ubuntu'
54+
with:
55+
name: libsilkcodec.so
56+
path: ${{github.workspace}}/silkcodec/build/libsilkcodec.so
57+
58+
- name: Upload dotnet lib
59+
uses: actions/upload-artifact@v4
60+
if: matrix.os == 'ubuntu'
61+
with:
62+
name: SilkSharp
63+
path: |
64+
${{github.workspace}}/SilkSharp/bin/Release/net8.0/publish/SilkSharp.dll
65+
${{github.workspace}}/SilkSharp/bin/Release/net8.0/publish/SilkSharp.xml
66+
${{github.workspace}}/SilkSharp/bin/Release/net8.0/publish/SilkSharp.pdb
67+
68+
- uses: actions/upload-artifact@v4
69+
if: matrix.os == 'windows'
70+
with:
71+
name: silkcodec.dll
72+
path: ${{github.workspace}}/silkcodec/build/Release/silkcodec.dll

Diff for: .github/workflows/osx.yml

-28
This file was deleted.

0 commit comments

Comments
 (0)