-
Notifications
You must be signed in to change notification settings - Fork 13
76 lines (63 loc) · 1.98 KB
/
compile.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
name: compile
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
compile:
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]
# Probably need different architectures too, e.g. M1 Macs?
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v1
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
if: runner.os != 'Windows'
- uses: jiro4989/setup-nim-action@v1
# Fix SSL error with choosenim
- run: |
curl -fO https://curl.se/ca/cacert.pem
install cacert.pem ~/.nimble/bin
ls ~/.nimble/bin
shell: bash
if: runner.os == 'Windows'
- run: |
sudo apt-get install gcc-arm-linux-gnueabihf
nimble build -d:debug -Y --cpu:arm
mv native_main native_main-armhf
file native_main-armhf
name: armhf build
if: runner.os == 'Linux'
- run: nimble build -d:debug -Y --verbose
- run: |
mv native_main.exe native_main
shell: bash
if: runner.os == 'Windows'
- run: |
mv native_main native_main-x86
nimble build --verbose -d:debug -Y '--passC:"-target arm64-apple-macos11"' '--passL:"-target arm64-apple-macos11"'
mv native_main native_main-arm64
lipo -create -output native_main native_main-x86 native_main-arm64
if: runner.os == 'macOS'
# - run: nimble test -Y
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: native_main-${{ runner.os }}
path: native_main
- name: Archive production artifacts
uses: actions/upload-artifact@v2
if: runner.os == 'Linux'
with:
name: native_main-armhf-${{ runner.os }}
path: native_main-armhf