forked from arition/torch-js
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (47 loc) · 1.48 KB
/
ci.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
name: CI
on:
push:
branches: [master, ci]
pull_request:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
if: "!contains(github.event.head_commit.message, 'ci skip')"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: "14"
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install conda on Windows
if: ${{ matrix.os == 'windows-latest' }}
uses: s-weigand/setup-conda@v1
- name: Install cmake dependency on Windows
if: ${{ matrix.os == 'windows-latest' }}
run: conda install -y libpng jpeg
- name: Install packages
run: yarn upgrade --dev
- name: Prebuild
run: yarn build-prebuild
- name: Build
run: yarn build
- name: Run test suite
run: yarn test
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: artifact-${{ matrix.os }}
path: prebuilds/**/*.tar.gz