-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.28 KB
/
build-native.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
name: Build Native
on: [push]
jobs:
build:
env:
NIM_VERSION: 1.0.2
runs-on: ubuntu-latest
steps:
- name: Setup environment
run: echo "::set-env name=NIM_VERSION::$NIM_VERSION"
- uses: actions/checkout@v2
- name: Cache choosenim
id: cache-choosenim
uses: actions/cache@v1
with:
path: ~/.choosenim
key: ${{ runner.os }}-choosenim-${{ env.NIM_VERSION }}
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v1
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-${{ env.NIM_VERSION }}
- name: Install Nim
if: steps.cache-choosenim.outputs.cache-hit != 'true' || steps.cache-nimble.outputs.cache-hit != 'true'
run: |
export CHOOSENIM_CHOOSE_VERSION="$NIM_VERSION"
curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh
sh init.sh -y
- name: Build project
run: |
export PATH=$HOME/.nimble/bin:$PATH
echo $PATH
nimble build -y
mkdir -p rel
mv hello_world rel/
- name: Run Tests
run: |
export PATH=$HOME/.nimble/bin:$PATH
echo $PATH
nimble test
- name: Upload artifact
uses: actions/upload-artifact@master
with:
name: release
path: rel