-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (61 loc) · 2.04 KB
/
build-debug.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
name: Build linux debug binaries
on:
workflow_dispatch:
push:
branches: [serenity]
jobs:
build:
name: Build and upload linux debug binaries
runs-on: ubuntu-latest
strategy:
matrix:
target: [aarch64-unknown-linux-gnu, x86_64-unknown-linux-gnu]
steps:
- uses: actions/checkout@v2
- name: Setup
run: |
# Install extra packages
echo "installing extra packages"
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common libopus-dev opus-tools
# --
# Add Docker PPA
echo "Adding Docker PPA"
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
# --
# Install Docker
echo "installing Docker"
sudo apt-get update
sudo apt-get install docker-ce
# --
# configure Docker
echo "configuring Docker perms"
sudo usermod -aG docker ${USER}
sudo -u ${USER} /bin/bash
# --
# install cross
echo "installing cross"
cargo install cross
# --
# add target per os
rustup target add ${{ matrix.target }}
- name: Cache Deps
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cross build --target ${{ matrix.target }} --release --verbose
- name: Create zip files
run: |
zip -j CourtJester-${{ matrix.target }} target/${{ matrix.target }}/release/courtjester info_sample.json
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: CourtJester-${{ matrix.target }}.zip
path: ./CourtJester-${{ matrix.target }}.zip
if-no-files-found: error