forked from arturo-lang/arturo
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (87 loc) · 2.3 KB
/
web.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
name: "Web"
on:
push:
branches:
- 'master'
tags-ignore:
- '**'
pull_request:
paths-ignore:
- 'docs/*'
- '*.yml'
- '*.md'
- 'LICENSE'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
build:
name: "Build & Test"
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- web
version:
- mini
arch:
- js
steps:
- name: "Checkout"
uses: actions/checkout@main
with:
submodules: recursive
- name: Get Date
id: get-date
run: echo "::set-output name=date::$(date "+%Y-%m-%d")"
shell: bash
- name: Cache ChooseNim
id: cache-choosenim
uses: actions/cache@v3
with:
path: ~/.choosenim
key: web-choosenim-${{ steps.get-date.outputs.date }}
- name: Cache Nimble
id: cache-nimble
uses: actions/cache@v3
with:
path: ~/.nimble
key: web-nimble-${{ hashFiles('*.nimble') }}
- name: Setup nim
uses: jiro4989/setup-nim-action@v1
with:
nim-version: '2.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: |
npm install -g uglify-js
sudo apt-get update
sudo apt-get install libgtk-3-dev libwebkit2gtk-4.0-dev libmpfr-dev
- name: Verify dependecies
run: |
nim --version
- name: Build Arturo
run: |
echo "$HOME/.arturo/bin" >> $GITHUB_PATH
./build.nims build --mode ${{ matrix.platform }} --log
- name: Build Arturo (Normal binary)
run: |
echo "$HOME/.arturo/bin" >> $GITHUB_PATH
./build.nims build --log
- name: Create artifact
run: |
mkdir webartifacts
cp bin/arturo.js webartifacts
cp bin/arturo.min.js webartifacts
- name: Upload Artifacts
uses: 'actions/upload-artifact@v2'
with:
name: "arturo-${{matrix.version}}"
path: webartifacts
- name: Run unit tests
run: |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
./bin/arturo tools/tester.web.art