-
Notifications
You must be signed in to change notification settings - Fork 25
131 lines (111 loc) · 3.51 KB
/
vult.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
129
130
131
name: Main workflow
on:
pull_request:
push:
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
ocaml-compiler:
- 4.12.x
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- name: Install requirements ${{ runner.os }}
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install luajit nodejs
- run: opam install ocamlbuild containers ppx_deriving ounit js_of_ocaml.4.0.0 js_of_ocaml-ppx pla bisect_ppx result
- run: opam exec make
- name: Run tests ${{ runner.os }}
if: runner.os == 'Linux'
run: opam exec make all
- name: Package the files for Linux
if: runner.os == 'Linux'
run: |
cp ./_build/src/vultc.native ./vultc
tar -cvzf vult-linux.tar.gz vultc runtime/vultin.h runtime/vultin.cpp
- name: Package the files for Mac
if: runner.os == 'macOS'
run: |
cp ./_build/src/vultc.native ./vultc
tar -cvzf vult-osx.tar.gz vultc runtime/vultin.h runtime/vultin.cpp
- name: Package the files for Windows
if: runner.os == 'Windows'
run: |
cp ./_build/src/vultc.native ./vultc.exe
7z a vult-win.zip vultc.exe runtime/vultin.h runtime/vultin.cpp
- name: Save Linux Artifacts
uses: actions/upload-artifact@v2
if: runner.os == 'Linux'
with:
name: vult-linux.tar.gz
path: vult-linux.tar.gz
- name: Save Js Vultweb Artifacts
uses: actions/upload-artifact@v2
if: runner.os == 'Linux'
with:
name: vultweb.js
path: vultweb.js
- name: Save Js Vultlib Artifacts
uses: actions/upload-artifact@v2
if: runner.os == 'Linux'
with:
name: vultlib.js
path: vultlib.js
- name: Save Js VultcJs Artifacts
uses: actions/upload-artifact@v2
if: runner.os == 'Linux'
with:
name: vultc.js
path: vultc.js
- name: Save Js VultcH Artifacts
uses: actions/upload-artifact@v2
if: runner.os == 'Linux'
with:
name: vultc.h
path: vultc.h
- name: Save Mac Artifacts
uses: actions/upload-artifact@v2
if: runner.os == 'macOS'
with:
name: vult-osx.tar.gz
path: vult-osx.tar.gz
- name: Save Windows Artifacts
uses: actions/upload-artifact@v2
if: runner.os == 'Windows'
with:
name: vult-win.zip
path: vult-win.zip
pre-release:
name: "Pre Release"
runs-on: "ubuntu-latest"
needs: build
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4.1.7
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
vult-linux.tar.gz
vult-osx.tar.gz
vult-win.zip
vultweb.js
vultlib.js
vultc.js
vultc.h