This repository has been archived by the owner on Oct 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (73 loc) · 2.3 KB
/
build_bin.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
name: Build binarys
on:
push:
branches:
- "main"
env:
NODE_VERSION: "18"
jobs:
# Build Bin to MacOS, Linux And Windows
build_nix:
runs-on: ${{ matrix.os }}
name: "${{ matrix.os == 'ubuntu-latest' && 'Linux' || matrix.os == 'windows-latest' && 'Windows' || 'MacOS' }} binary build"
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: "${{ env.NODE_VERSION }}.x"
- name: Set up NASM (Windows only)
if: matrix.os == 'windows-latest'
uses: ilammy/[email protected]
- name: Install dependencies
run: npm ci
- name: Build Binary file
continue-on-error: true
run: npm run build -- --verbose
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os == 'ubuntu-latest' && 'Linux' || matrix.os == 'windows-latest' && 'Windows' || 'MacOS' }}_${{ runner.arch }}_${{ env.NODE_VERSION }}
path: BdsManegerCLI_*
# Build for Linux and Android (arm64)
build_linux_arm64:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- linux
# - android
name: "${{ matrix.target == 'linux' && 'Linux' || 'Android' }} binary build for Arm64 arch"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: "${{ env.NODE_VERSION }}.x"
- name: Install host build
run: |
sudo apt update
sudo apt install -y binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Install dependencies
run: npm ci
- name: Build Binary file
continue-on-error: true
run: npm run build -- --Arch=arm64 --Platform=${{ matrix.target }}
env:
CXX_host: "g++"
CC_host: "gcc"
CXX: aarch64-linux-gnu-g++
CC: aarch64-linux-gnu-gcc
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}_${{ env.NODE_VERSION }}
path: BdsManegerCLI_*