Update ci.yml New archs #17
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 CLI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
release: | |
types: [ created ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
target: | |
- x86_64-unknown-linux-gnu | |
- aarch64-unknown-linux-gnu # Linux ARM 64-bit | |
- armv7-unknown-linux-gnueabihf # Linux ARM 32-bit | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Add target | |
run: rustup target add ${{ matrix.target }} | |
- name: Set up cross compile | |
run: | | |
case ${{ matrix.target }} in | |
aarch64-unknown-linux-gnu) | |
sudo dpkg --add-architecture arm64 | |
sudo apt-get update && sudo apt-get install --assume-yes libssl-dev:aarch64 | |
;; | |
armv7-unknown-linux-gnueabihf) | |
sudo dpkg --add-architecture armv7 | |
sudo apt-get update && sudo apt-get install --assume-yes libssl-dev:armvhf | |
esac | |
shell: bash | |
- name: Build | |
run: cargo build --release --target ${{ matrix.target }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rusty-buddy-${{ matrix.target }} | |
path: target/release/rusty-buddy${{ matrix.os == 'windows-latest' && '.exe' || '' }} |