-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (99 loc) · 2.58 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# SPDX-License-Identifier: MIT
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
nimversion:
- binary:stable
os: [ubuntu-latest, macOS-13, windows-latest]
include:
- os: ubuntu-latest
file: nimip
artifact: package-linux-x64
- os: macOS-13
file: nimip
artifact: package-darwin-x64
- os: windows-latest
file: nimip.exe
artifact: binary-win-x64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Nim
uses: iffy/install-nim@v5
with:
version: ${{ matrix.nimversion }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check package validity
run: nimble check --accept
- name: Build
run: nimble build -d:ssl -d:release --accept
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.file }}
dll:
name: DLLs for Windows
runs-on: ubuntu-latest
steps:
- name: Download DLLs
uses: wei/curl@master
with:
args: https://nim-lang.org/download/dlls.zip --output dlls.zip
- name: Unzip
uses: montudor/action-zip@v1
with:
args: unzip -qq dlls.zip
- name: Upload DLLs artifact
uses: actions/upload-artifact@v4
with:
name: dlls
path: |
cacert.pem
libcrypto-1_1.dll
libcrypto-1_1-x64.dll
sqlite3_32.dll
sqlite3_64.dll
libssl-1_1.dll
libssl-1_1-x64.dll
package-windows:
name: Package for Windows
runs-on: ubuntu-latest
needs: [build, dll]
steps:
- name: Download binary artifact
uses: actions/download-artifact@v4
with:
name: binary-win-x64
- name: Download DLLs artifact
uses: actions/download-artifact@v4
with:
name: dlls
- name: Compress
uses: montudor/action-zip@v1
with:
args: zip -qq -r package-win-x64.zip .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: package-win-x64
path: package-win-x64.zip
- name: Purge unnecessary artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: |
binary-win-x64
dlls