-
Notifications
You must be signed in to change notification settings - Fork 22
47 lines (37 loc) · 1.04 KB
/
buildci.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
name: Build CI
on: [push, pull_request]
jobs:
pre-build-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Format
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy -- -Dwarnings
build:
needs: pre-build-checks
strategy:
matrix:
arch: [amd64, arm64]
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Setup cross compiling
run: |
source ./.github/buildci.sh
setup_cross_compiling ${{ matrix.arch }}
- name: Build
run: |
[ $GITHUB_REF_TYPE = "branch" ] && \
export __REF=${GITHUB_SHA::7} || \
export __REF=$GITHUB_REF_NAME
source ./.github/buildci.sh
build_for_arch ${{ matrix.arch }} $__REF
- name: Export artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: artifacts