-
Notifications
You must be signed in to change notification settings - Fork 2
160 lines (141 loc) · 5.39 KB
/
compileBinariesOnRelease.yaml
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Compile binaries for platform matrix on release
on:
release:
types: [created]
jobs:
linuxBuildX86:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: '2.0.0'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: nimble install -y arraymancer nimpy
- name: Compile nimplex as binary for X86_64 Linux
run: nim c -d:release --cpu:amd64 nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex
asset_name: nimplex-linux-amd64
asset_content_type: application/octet-stream
- name: Compile nimplex as Python module for X86_64 Linux
run: nim c -d:release --cpu:amd64 --app:lib --out:nimplex.so nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex.so
asset_name: nimplex-python-linux-amd64.so
asset_content_type: application/octet-stream
macosBuildX86_64:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Nim with Homebrew
run: brew install nim
- name: Install dependencies
run: nimble install -y arraymancer nimpy
- name: Compile nimplex as binary for X86_64 MacOS
run: nim c -d:release --cpu:amd64 nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-3
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex
asset_name: nimplex-macos-amd64
asset_content_type: application/octet-stream
- name: Compile nimplex as Python module for X86_64 MacOS
run: nim c -d:release --cpu:amd64 --app:lib --out:nimplex.so nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-4
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex.so
asset_name: nimplex-python-macos-amd64.so
asset_content_type: application/octet-stream
macosBuildARM64:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Nim with Homebrew
run: brew install nim
- name: Install dependencies
run: nimble install -y arraymancer nimpy
- name: Compile nimplex as binary for ARM MacOS
run: nim c -d:release --cpu:arm64 nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex
asset_name: nimplex-macos-arm64
asset_content_type: application/octet-stream
- name: Compile nimplex as Python module for ARM MacOS
run: nim c -d:release --cpu:arm64 --app:lib --out:nimplex.so nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-6
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex.so
asset_name: nimplex-python-macos-arm64.so
asset_content_type: application/octet-stream
windowsBuild:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: '2.0.0'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: nimble install -y arraymancer nimpy
- name: Compile nimplex as binary for X86 Windows
run: nim c -d:release --cpu:amd64 nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-7
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex.exe
asset_name: nimplex-windows-amd64.exe
asset_content_type: application/octet-stream
- name: Compile nimplex as Python module for X86 Windows
run: nim c -d:release --cpu:amd64 --app:lib --out:nimplex.pyd nimplex.nim
- name: Upload Release Asset
id: upload-release-asset-8
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./nimplex.pyd
asset_name: nimplex-python-windows-amd64.pyd
asset_content_type: application/octet-stream