Update dependencies, drop select impl #111
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 binaries | |
on: | |
push: | |
branches: | |
- unstable | |
- stable | |
tags: | |
- '*' | |
pull_request: | |
jobs: | |
linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install cross compilers | |
run: | | |
sudo apt update | |
sudo apt install gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf -y | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rust-src | |
- name: Build for x86_64 | |
run: | | |
cargo build --release --target=x86_64-unknown-linux-gnu | |
strip target/x86_64-unknown-linux-gnu/release/aochatproxy | |
cp target/x86_64-unknown-linux-gnu/release/aochatproxy aochatproxy-linux-x86_64 | |
- name: Build for aarch64 | |
run: | | |
cargo build --release --target=aarch64-unknown-linux-gnu | |
aarch64-linux-gnu-strip target/aarch64-unknown-linux-gnu/release/aochatproxy | |
cp target/aarch64-unknown-linux-gnu/release/aochatproxy aochatproxy-linux-aarch64 | |
- name: Build for armv7 | |
run: | | |
cargo build --release --target=armv7-unknown-linux-gnueabihf | |
arm-linux-gnueabihf-strip target/armv7-unknown-linux-gnueabihf/release/aochatproxy | |
cp target/armv7-unknown-linux-gnueabihf/release/aochatproxy aochatproxy-linux-armv7 | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: aochatproxy-linux | |
path: | | |
aochatproxy-linux-x86_64 | |
aochatproxy-linux-aarch64 | |
aochatproxy-linux-armv7 | |
freebsd: | |
name: FreeBSD | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install toolchain | |
run: | | |
sudo apt install llvm clang lld -y | |
- name: Prepare sysroots | |
run: | | |
mkdir freebsd_amd64_sysroot | |
curl -s https://download.freebsd.org/ftp/snapshots/amd64/14.0-CURRENT/base.txz \ | |
| tar -xJf - -C freebsd_amd64_sysroot ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc | |
mkdir freebsd_arm64_sysroot | |
curl -s https://download.freebsd.org/ftp/snapshots/arm64/14.0-CURRENT/base.txz \ | |
| tar -xJf - -C freebsd_arm64_sysroot ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rust-src | |
- name: Build for FreeBSD x86_64 | |
run: | | |
CC="clang" CFLAGS="--sysroot=$PWD/freebsd_amd64_sysroot" cargo build --release --target=x86_64-unknown-freebsd | |
llvm-strip target/x86_64-unknown-freebsd/release/aochatproxy | |
cp target/x86_64-unknown-freebsd/release/aochatproxy aochatproxy-freebsd-x86_64 | |
- name: Build for FreeBSD aarch64 | |
run: | | |
CC="clang" CFLAGS="--sysroot=$PWD/freebsd_arm64_sysroot" cargo build --release --target=aarch64-unknown-freebsd | |
llvm-strip target/aarch64-unknown-freebsd/release/aochatproxy | |
cp target/aarch64-unknown-freebsd/release/aochatproxy aochatproxy-freebsd-aarch64 | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: aochatproxy-freebsd | |
path: | | |
aochatproxy-freebsd-x86_64 | |
aochatproxy-freebsd-aarch64 | |
macos: | |
name: MacOS | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rust-src | |
- name: Build | |
run: | | |
cargo build --release --target=x86_64-apple-darwin | |
strip target/x86_64-apple-darwin/release/aochatproxy | |
cp target/x86_64-apple-darwin/release/aochatproxy aochatproxy-macos | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: aochatproxy-macos | |
path: | | |
aochatproxy-macos | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rust-src | |
- name: Build | |
run: | | |
cargo build --release --target=x86_64-pc-windows-msvc | |
cp target/x86_64-pc-windows-msvc/release/aochatproxy.exe aochatproxy-windows.exe | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: aochatproxy-windows | |
path: | | |
aochatproxy-windows.exe |