-
Notifications
You must be signed in to change notification settings - Fork 110
49 lines (40 loc) · 1.41 KB
/
linux-client.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
name: Build Linux SpacetimeDB client
on:
push:
tags:
- '**'
branches:
- master
jobs:
linux-client:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Add aarch64 target
run: |
rustup target add aarch64-unknown-linux-gnu
- name: Install gcc-aarch64-linux-gnu
run: sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Compile x86
run: |
cargo build --release -p spacetimedb-cli
mkdir build
mv target/release/spacetime build/spacetime-linux-x86
- name: Compile Aarch64
run: |
cargo build --release -p spacetimedb-cli --target=aarch64-unknown-linux-gnu
mv target/aarch64-unknown-linux-gnu/release/spacetime build/spacetime-linux-aarch64
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Upload to DO Spaces
uses: shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: ${{ vars.AWS_BUCKET }}
source_dir: build
endpoint: https://nyc3.digitaloceanspaces.com
destination_dir: ${{ steps.extract_branch.outputs.branch }}