forked from mixtape-bot/connector-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (61 loc) · 1.9 KB
/
compile.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
name: compile-natives
on:
push:
branches: [ "main" ]
jobs:
linux:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
- target: i686-unknown-linux-gnu
deps: apt-get install -y gcc-multilib
- target: aarch64-unknown-linux-gnu
deps: apt-get install -y gcc-aarch64-linux-gnu
- target: armv7-unknown-linux-gnueabihf
deps: apt-get install -y gcc-arm-linux-gnueabihf
name: Compile ${{ matrix.target }} target
runs-on: ubuntu-20.04
container:
image: ubuntu:16.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Essentials
run: |
apt-get update -y
apt-get upgrade -y
apt-get install -y cmake curl gcc openjdk-8-jdk-headless
- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}
- name: Install linker dependencies
run: ${{ matrix.deps }}
if: ${{ matrix.deps != '' }}
- name: Compile natives
run: cargo build -r --target=${{ matrix.target }}
windows:
strategy:
matrix:
include:
- target: x86_64-pc-windows-msvc
- target: i686-pc-windows-msvc
name: Compile ${{ matrix.target }} target
environment: MavenRelease
runs-on: windows-2019
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}
- name: Compile natives
run: cargo build -r --target=${{ matrix.target }}