-
-
Notifications
You must be signed in to change notification settings - Fork 129
73 lines (71 loc) · 2.19 KB
/
ci.yml
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
name: Continuous Integration
on:
push:
paths:
- 'src/**'
- 'res/**'
- 'build.bat'
- '.github/workflows/**'
pull_request:
paths:
- 'src/**'
- 'res/**'
- 'build.bat'
- '.github/workflows/**'
jobs:
compile-wsldl-windows:
name: Compile wsldl
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
$short_sha = $env:GITHUB_SHA.SubString(0, 7)
$Env:GO_BUILD_OPTS = "-ldflags `"-X github.com/yuk7/wsldl/version.version=CI-${short_sha}`""
.\build.bat all
Compress-Archive -Path .\out\icons\* -DestinationPath .\out\icons.zip
- uses: actions/upload-artifact@v2
with:
name: Build results-Windows
path: |
out/wsldl.exe
out/icons.zip
if-no-files-found: error
compile-wsldl-windows-arm64:
name: Compile wsldl ARM64
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
$Env:PATH = "${Env:USERPROFILE}\go\bin;${Env:PATH}"
$short_sha = $env:GITHUB_SHA.SubString(0, 7)
$Env:GO_BUILD_OPTS = "-ldflags `"-X github.com/yuk7/wsldl/version.version=CI-${short_sha}`""
$Env:GOARCH="arm64"
.\build.bat all
Compress-Archive -Path .\out\icons\* -DestinationPath .\out\icons.zip
- uses: actions/upload-artifact@v2
with:
name: Build results-Windows-ARM64
path: |
out/wsldl.exe
out/icons.zip
if-no-files-found: error
compile-wsldl-linux:
name: Cross-compile wsldl from Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest
export PATH=$PATH:~/go/bin
cd src
goversioninfo
env GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/yuk7/wsldl/version.version=CI-Cross-${GITHUB_SHA:0:7}"
- uses: actions/upload-artifact@v2
with:
name: Build results-Linux
path: |
src/wsldl.exe
if-no-files-found: error