-
Notifications
You must be signed in to change notification settings - Fork 14
63 lines (59 loc) · 1.61 KB
/
build.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
name: "winrt-go build"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
# project should compile on non-windows platforms
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: init
run: |
docker build -f Dockerfile.build -t winrt-go .
docker run --rm -i -d --name winrt-go winrt-go
- name: prepare
run: docker exec -i winrt-go make prepare
- name: sanity-check
run: docker exec -i winrt-go make sanity-check
- name: build
run: docker exec -i winrt-go make build
- name: test
run: docker exec -i winrt-go make test
- name: release
if: github.ref == 'refs/heads/main'
run: docker exec -i winrt-go make release
- name: clean
run: |
docker exec -i winrt-go make clean
docker stop winrt-go
# but tests only run on windows
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.18.2
- name: init
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v1.46.2/install.sh | sh -s -- -b "$(go env GOPATH)/bin" v1.46.2
- name: prepare
run: make prepare
- name: sanity-check
run: make sanity-check
- name: build
run: make build
- name: test
run: make test
- name: release
if: github.ref == 'refs/heads/main'
run: make release
- name: clean
run: |
make clean