Add search #18
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: CI | |
on: | |
push: | |
branches: | |
- main | |
env: | |
BIN_NAME: bvr | |
jobs: | |
build_job: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build: | |
[ | |
x86_64-linux, | |
x86_64-macos, | |
x86_64-windows, | |
aarch64-macos, | |
aarch64-linux, | |
] | |
include: | |
- build: x86_64-linux | |
os: ubuntu-latest | |
rust: stable | |
target: x86_64-unknown-linux-gnu | |
cross: false | |
- build: x86_64-macos | |
os: macos-latest | |
rust: stable | |
target: x86_64-apple-darwin | |
cross: false | |
- build: x86_64-windows | |
os: windows-latest | |
rust: stable | |
target: x86_64-pc-windows-msvc | |
cross: false | |
- build: aarch64-macos | |
os: macos-latest | |
rust: stable | |
target: aarch64-apple-darwin | |
- build: aarch64-linux | |
os: ubuntu-latest | |
rust: stable | |
target: aarch64-unknown-linux-gnu | |
cross: true | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install ${{ matrix.rust }} toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust }} | |
target: ${{ matrix.target }} | |
- name: Install Linux GCC toolchain | |
if: matrix.target == 'aarch64-unknown-linux-gnu' | |
shell: bash | |
run: sudo apt-get install gcc-aarch64-linux-gnu | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Build release binary | |
run: cargo build --release --locked --target ${{ matrix.target }} | |
- name: Build archive | |
shell: bash | |
run: | | |
mkdir dist | |
if [ "${{ matrix.os }}" = "windows-latest" ]; then | |
cp "target/${{ matrix.target }}/release/${{ env.BIN_NAME }}.exe" "dist/" | |
else | |
cp "target/${{ matrix.target }}/release/${{ env.BIN_NAME }}" "dist/" | |
fi | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-${{ matrix.build }} | |
path: dist |