-
Notifications
You must be signed in to change notification settings - Fork 23
58 lines (50 loc) · 1.34 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
name: Build Binaries
on:
push:
branches: [ main ]
jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- name: "Windows"
os: windows-latest
out_paths: './build/release/geode.exe'
static: ''
- name: "macOS"
os: macos-latest
out_paths: './build/release/geode'
static: 'export OPENSSL_STATIC=1'
- name: "linux"
os: ubuntu-latest
out_paths: './build/release/geode'
static: ''
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
with:
key: ${{ matrix.config.name }}
target-dir: ./build
- name: Build
run: |
${{ matrix.config.static }}
cargo build --release --target-dir ${{ github.workspace }}/build
- name: Move to output folder
shell: bash
working-directory: ${{ github.workspace }}
run: |
mkdir ./out
mv ${{ matrix.config.out_paths }} ./out
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.config.name }} CLI Binary
path: ./out/