1
1
name : libgoldilocks pipeline
2
2
on : push
3
3
jobs :
4
- build :
4
+ build-mac :
5
5
strategy :
6
6
matrix :
7
- platform : [ubuntu-latest, windows-latest, raspbian-private, macos-latest]
8
- runs-on : ${{ matrix.platform }}
7
+ config :
8
+ - {os: macos-13, path: darwin-x86_64, arch: x86_64}
9
+ - {os: macos-latest, path: darwin-arm64, arch: arm64}
10
+ runs-on : ${{ matrix.config.os }}
9
11
steps :
10
12
- name : Checkout
11
- uses : actions/checkout@v1
12
- - name : Build Linux
13
- if : ${{ matrix.platform == 'ubuntu-latest' || matrix.platform == 'raspbian-private'}}
14
- run : |
15
- mkdir -p src/.libs
16
- docker build . -t libgoldilocks:${{matrix.platform}}
17
- docker create -it --name dummy libgoldilocks:${{matrix.platform}} bash
18
- docker cp dummy:/usr/local/bin/libgoldilocks.a src/.libs/libgoldilocks.a
19
- docker rm -f dummy
20
- - name : Build Mac
21
- if : ${{ matrix.platform == 'macos-latest' }}
13
+ uses : actions/checkout@v4
14
+ - name : Build
22
15
run : |
23
- brew install automake
16
+ brew install automake libtool
24
17
autoreconf --install && ./configure && make all
18
+ - name : Upload
19
+ uses : actions/upload-artifact@v3
20
+ with :
21
+ name : libgoldilocks-darwin-${{ matrix.config.arch }}
22
+ path : src/.libs/libgoldilocks.a
23
+
24
+ build-windows :
25
+ runs-on : windows-latest
26
+ steps :
27
+ - name : Checkout
28
+ uses : actions/checkout@v4
25
29
- name : Setup Win
26
- if : ${{ matrix.platform == 'windows-latest' }}
27
30
uses : msys2/setup-msys2@v2
28
31
with :
29
32
msystem : mingw64
@@ -34,50 +37,87 @@ jobs:
34
37
autoconf
35
38
automake
36
39
libtool
37
- mingw-w64-x86_64-toolchain
38
- - name : Build Windows
39
- if : ${{ matrix.platform == 'windows-latest' }}
40
+ mingw-w64-x86_64-gcc
41
+ mingw-w64-x86_64-make
42
+ mingw-w64-x86_64-binutils
43
+ mingw-w64-x86_64-libwinpthread-git
44
+ - name : Build
40
45
shell : msys2 {0}
41
46
run : |
42
47
autoreconf --install && ./configure && make all
43
48
- name : Upload
44
- uses : actions/upload-artifact@v2
49
+ uses : actions/upload-artifact@v3
50
+ with :
51
+ name : libgoldilocks-windows-x86_64
52
+ path : src/.libs/libgoldilocks.a
53
+
54
+ build-alpine :
55
+ strategy :
56
+ matrix :
57
+ config :
58
+ - {arch: x86_64, branch: latest-stable}
59
+ - {arch: aarch64, branch: latest-stable}
60
+ runs-on : ubuntu-latest
61
+ steps :
62
+ - name : Checkout
63
+ uses : actions/checkout@v4
64
+ - name : Setup Alpine Linux
65
+ uses : jirutka/setup-alpine@v1
66
+ with :
67
+ arch : ${{ matrix.config.arch }}
68
+ branch : ${{ matrix.config.branch }}
69
+ - name : Install deps
70
+ shell : alpine.sh --root {0}
71
+ run : |
72
+ apk add automake autoconf libtool make gcc g++
73
+ - name : Build
74
+ shell : alpine.sh --root {0}
75
+ run : |
76
+ autoreconf --install && ./configure && make all
77
+ - name : Upload
78
+ uses : actions/upload-artifact@v3
45
79
with :
46
- name : libgoldilocks-${{matrix.platform }}
80
+ name : libgoldilocks-linux- ${{ matrix.config.arch }}
47
81
path : src/.libs/libgoldilocks.a
82
+
48
83
release :
49
84
runs-on : ubuntu-latest
50
85
if : github.ref == 'refs/heads/master'
51
- needs : build
86
+ needs : [ build-mac, build-windows, build-alpine]
52
87
steps :
53
88
- name : Checkout
54
89
uses : actions/checkout@v1
55
- - name : Download Linux lib
56
- uses : actions/download-artifact@v2
90
+ - name : Linux x86_64
91
+ uses : actions/download-artifact@v3
57
92
with :
58
- name : libgoldilocks-ubuntu-latest
93
+ name : libgoldilocks-linux-x86_64
59
94
path : linux-x86_64
60
- - name : Download Raspbian lib
61
- uses : actions/download-artifact@v2
95
+ - name : Linux arm64
96
+ uses : actions/download-artifact@v3
62
97
with :
63
- name : libgoldilocks-raspbian-private
98
+ name : libgoldilocks-linux-aarch64
64
99
path : linux-arm64
65
- - name : Download Mac lib
66
- uses : actions/download-artifact@v2
100
+ - name : Darwin x86_64
101
+ uses : actions/download-artifact@v3
67
102
with :
68
- name : libgoldilocks-macos-latest
103
+ name : libgoldilocks-darwin-x86_64
69
104
path : darwin-x86_64
70
- - name : Download Win lib
71
- uses : actions/download-artifact@v2
105
+ - name : Darwin arm64
106
+ uses : actions/download-artifact@v3
107
+ with :
108
+ name : libgoldilocks-darwin-arm64
109
+ path : darwin-arm64
110
+ - name : Win x86_64
111
+ uses : actions/download-artifact@v3
72
112
with :
73
- name : libgoldilocks-windows-latest
113
+ name : libgoldilocks-windows-x86_64
74
114
path : windows-x86_64
75
115
- name : Create zip
76
116
run : |
77
- zip -r libgoldilocks linux-x86_64 linux-arm64 darwin-x86_64 windows-x86_64
117
+ zip -r libgoldilocks linux-x86_64 linux-arm64 darwin-x86_64 darwin-arm64 windows-x86_64
78
118
- name : Bump version
79
119
id : version_bump
80
- uses : anothrNick/github-tag-action@1.13 .0
120
+ uses : anothrNick/github-tag-action@1.37 .0
81
121
env :
82
122
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
83
123
DEFAULT_BUMP : " patch"
0 commit comments