Build linux debug binaries #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |