crossed up #18
Workflow file for this run
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 Artifacts | |
on: | |
push: | |
branches: | |
- build | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Rust and Cross | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
source $HOME/.cargo/env | |
rustup component add rustfmt | |
cargo install cross | |
- name: Install Docker | |
run: | | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
sudo sh get-docker.sh | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Build artifacts for Linux | |
run: | | |
sudo apt-get update | |
sudo apt-get install musl-tools | |
rustup target add x86_64-unknown-linux-musl | |
cross build --target x86_64-unknown-linux-musl --release | |
env: | |
PKG_CONFIG_ALLOW_CROSS: 1 | |
- name: Build artifacts for Windows | |
run: cross build --target x86_64-pc-windows-gnu --release | |
env: | |
PKG_CONFIG_ALLOW_CROSS: 1 | |
- name: Build artifacts for Mac | |
run: cross build --target x86_64-apple-darwin --release | |
env: | |
PKG_CONFIG_ALLOW_CROSS: 1 | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: artifacts | |
path: | | |
target/x86_64-pc-windows-gnu/release/ | |
target/x86_64-apple-darwin/release/ | |
target/x86_64-unknown-linux-musl/release/ |