-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (79 loc) · 3.11 KB
/
publish-prebuild.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
name: publish-prebuild
on:
push:
tags:
- "v*.*.*"
# 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: Cache OpenCV for Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/cache@v2
id: cache-opencv-linux
with:
path: /home/runner/work/sort-node/sort-node/opencv/build
key: cache-opencv-linux-2
- name: Install OpenCV for Linux
if: matrix.os == 'ubuntu-latest'
uses: Dovyski/setup-opencv-action@v1
with:
opencv-version: '3.4.2'
opencv-extra-modules: false
- name: Install Eigen for Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y libeigen3-dev
- name: Install OpenCV and Eigen for Mac
if: ${{ matrix.os == 'macos-latest'}}
run: brew install opencv3 eigen
- name: Cache OpenCV for Windows
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/cache@v2
id: cache-opencv-windows
with:
path: .github\workflows\scripts\opencv-3.4.14
key: ${{ runner.os }}-${{ hashFiles('.github/workflows/scripts/installOpenCV.bat') }}
- name: Install OpenCV for Windows
if: matrix.os == 'windows-latest' && steps.cache-opencv-windows.outputs.cache-hit != 'true'
run: |
cd .github/workflows/scripts
./installOpenCV.bat
- name: Install Eigen for Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
curl https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.zip -o eigen-3.3.9.zip -s
mkdir "C:\eigen"
unzip eigen-3.3.9.zip -d "C:\eigen"
mv C:\eigen\eigen-3.3.9 C:\eigen\Eigen3
setx EIGEN3_INCLUDE_DIR C:\eigen
- name: Install packages
run: yarn upgrade --dev
- name: Prebuild for Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
env:
OpenCV_DIR: /home/runner/work/sort-node/sort-node/opencv/build
run: yarn build-prebuild -u ${{ secrets.ACCESS_GITHUB_TOKEN }}
- name: Prebuild for Mac
if: ${{ matrix.os == 'macos-latest' }}
run: yarn build-prebuild -u ${{ secrets.ACCESS_GITHUB_TOKEN }}
- name: Prebuild for Windows
if: ${{ matrix.os == 'windows-latest' }}
env:
OpenCV_DIR: D:/a/sort-node/sort-node/.github/workflows/scripts/opencv-3.4.14/opencv/build/
EIGEN3_INCLUDE_DIR: C:/eigen
run: yarn build-prebuild -u ${{ secrets.ACCESS_GITHUB_TOKEN }}