-
-
Notifications
You must be signed in to change notification settings - Fork 32
128 lines (113 loc) · 3.3 KB
/
linux.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
126
127
128
name: "Linux"
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: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
version:
- mini
- full
- safe
arch:
#- x86
- amd64
#- arm
- arm64
exclude:
- version: full
arch: x86
- version: full
arch: arm
- version: full
arch: arm64
- version: safe
arch: x86
- version: safe
arch: arm
- version: safe
arch: arm64
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: ${{ matrix.os }}-choosenim-${{ steps.get-date.outputs.date }}
- name: Cache Nimble
id: cache-nimble
uses: actions/cache@v3
with:
path: ~/.nimble
key: ${{ matrix.os }}-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 (mini / x86)
if: matrix.version == 'mini' && matrix.arch != 'arm' && matrix.arch != 'arm64'
run: |
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib
- name: Install dependencies (mini / arm)
if: matrix.version == 'mini' && (matrix.arch == 'arm' || matrix.arch == 'arm64')
run: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu
- name: Install dependencies (full)
if: matrix.version != 'mini'
run: |
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 "${{ github.workspace }}/bin" >> $GITHUB_PATH
./build.nims build --mode ${{ matrix.version }} --arch ${{ matrix.arch }} --log
- name: Upload Artifacts
uses: 'actions/upload-artifact@v2'
with:
name: "arturo-${{matrix.version}}-${{matrix.arch}}-linux"
path: bin/arturo
- name: Run unit tests (mini)
if: matrix.arch == 'amd64' && (matrix.version == 'mini')
run: |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
arturo tools/tester.art
- name: Run unit tests (full)
if: matrix.arch == 'amd64' && (matrix.version == 'full')
run: |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
./bin/arturo tools/tester.art
./bin/arturo tools/unitt-tester.art