-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (94 loc) · 2.7 KB
/
build.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
name: Build
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
tags-ignore:
- "plugin-v*"
- "v*"
jobs:
build_frontend:
name: Build frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "**/yarn.lock"
- name: Build assets
shell: bash
run: |
make static
make static_plugin
build_skynet:
needs: build_frontend
name: Build skynet ${{ matrix.platform.os_name }}
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
platform:
- os_name: linux-x86_64
os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
bin: skynet
name: skynet-linux-x86_64.tar.gz
- os_name: linux-i686
os: ubuntu-20.04
target: i686-unknown-linux-gnu
bin: skynet
name: skynet-linux-i686.tar.gz
- os_name: linux-aarch64
os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
bin: skynet
name: skynet-linux-aarch64.tar.gz
- os_name: windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
bin: skynet.exe
name: skynet-windows-x86_64.zip
- os_name: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
bin: skynet
name: skynet-darwin-x86_64.tar.gz
- os_name: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
bin: skynet
name: skynet-darwin-aarch64.tar.gz
steps:
- uses: actions/checkout@v4
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- uses: ilammy/setup-nasm@v1
if: ${{ matrix.platform.os == 'windows-latest'}}
- name: Install Protoc
id: protoc-install
uses: arduino/setup-protoc@v3
with:
version: "27.3"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set protoc path
shell: bash
run: |
echo "${{ steps.protoc-install.outputs.path }}" >> $GITHUB_PATH
- name: Update gcc
if: ${{ matrix.platform.os == 'ubuntu-20.04'}}
shell: bash
run: |
echo "CC=gcc-10" >> $GITHUB_ENV
echo "CXX=g++-10" >> $GITHUB_ENV
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: "both"
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: false