-
Notifications
You must be signed in to change notification settings - Fork 10
94 lines (83 loc) · 3.05 KB
/
Copy pathafs-cmd-ci.yml
File metadata and controls
94 lines (83 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Build afs.cmd
on:
push:
branches: [ "master" ]
paths:
- 'AssFontSubset.Core/**.cs'
- 'AssFontSubset.Core/**.csproj'
- 'AssFontSubset.Console/**.cs'
- 'AssFontSubset.Console/**.csproj'
pull_request:
branches: [ "master" ]
paths:
- 'AssFontSubset.Core/**.cs'
- 'AssFontSubset.Core/**.csproj'
- 'AssFontSubset.Console/**.cs'
- 'AssFontSubset.Console/**.csproj'
workflow_dispatch:
jobs:
build:
name: build-${{ matrix.config.target }}-${{ matrix.arch }}
runs-on: ${{ matrix.config.os }}
env:
identifier: ${{ matrix.config.target }}-${{ matrix.arch }}
strategy:
matrix:
harfbuzz_ver: ['10.1.0']
dotnet_version: ['9.x']
config:
- os: windows-latest
target: win
framework: net9.0
- os: windows-latest
target: linux-musl
framework: net8.0 # need zig fix? https://github.com/ziglang/zig/pull/20081
- os: macos-latest
target: osx
framework: net9.0
arch: [x64, arm64]
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet_version }}
- name: Checkout
uses: actions/checkout@v4
- name: Test
if: matrix.config.target != 'osx'
run: |
dotnet --version
cd ./AssFontSubset.CoreTests
dotnet restore
dotnet test
cd ..
- name: Setup Zig Compiler (target linux)
if: matrix.config.target == 'linux-musl'
uses: mlugg/setup-zig@v2.2.1
with:
version: "master"
- name: Add llvm-objcopy (target linux)
if: matrix.config.target == 'linux-musl'
run: |
Invoke-WebRequest -Uri https://github.com/MIRIMIRIM/build-harfbuzz/releases/download/utils/llvm-objcopy.exe -OutFile ./AssFontSubset.Console/llvm-objcopy.exe
- name: Change to afs.cmd and Publish
run: |
cd ./AssFontSubset.Console
dotnet restore
dotnet publish -c Release -r ${{ env.identifier }} -f ${{ matrix.config.framework }}
- name: Set short version
shell: bash
run: |
ver_short=`git rev-parse --short HEAD`
echo "VERSION=$ver_short" >> $GITHUB_ENV
- name: Upload exe files
uses: actions/upload-artifact@v4
with:
name: AssFontSubset.Console_g${{ env.VERSION }}_${{ env.identifier }}
path: |
AssFontSubset.Console/bin/Release/${{ matrix.config.framework }}/${{ env.identifier }}/publish/
!AssFontSubset.Console/bin/Release/${{ matrix.config.framework }}/${{ env.identifier }}/publish/*.a
!AssFontSubset.Console/bin/Release/${{ matrix.config.framework }}/${{ env.identifier }}/publish/*.pdb
!AssFontSubset.Console/bin/Release/${{ matrix.config.framework }}/${{ env.identifier }}/publish/*.dbg
!AssFontSubset.Console/bin/Release/${{ matrix.config.framework }}/${{ env.identifier }}/publish/*.dwarf
!AssFontSubset.Console/bin/Release/${{ matrix.config.framework }}/${{ env.identifier }}/publish/*.dSYM