ci: remove variable toolchain #59
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 | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
#- aarch64-apple-darwin | |
#- aarch64-unknown-linux-gnu | |
#- aarch64-unknown-linux-musl | |
#- x86_64-apple-darwin | |
#- x86_64-pc-windows-gnu | |
- x86_64-unknown-linux-gnu | |
#- x86_64-unknown-linux-musl | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
- name: setup rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.74.0 | |
# - name: install windows dependencies | |
# if: ${{ matrix.arch == 'x86_64-pc-windows-gnu' }} | |
# run: sudo apt install gcc-mingw-w64 | |
- name: install target | |
run: rustup target add ${{ matrix.arch }} | |
- name: build | |
run: | | |
cargo build --release --all-features --target ${{ matrix.arch }} | |
cp target/${{ matrix.arch }}/release/rebar . | |
- name: compress with upx | |
uses: crazy-max/ghaction-upx@v3 | |
with: | |
version: v4.1.0 | |
files: | | |
rebar | |
args: --best --lzma | |
- name: upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rebar-${{ matrix.arch }} | |
path: rebar |