Skip to content

Update catwrt-update.sh #11

Update catwrt-update.sh

Update catwrt-update.sh #11

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [linux-amd, linux-arm]
include:
- build: linux-amd
os: ubuntu-20.04
archive-name: catwrt-update-amd.tar.gz
- build: linux-arm
os: ubuntu-20.04
archive-name: catwrt-update-arm.tar.gz
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: docker://clux/muslrust:stable
with:
args: cargo install cargo-strip
- name: Build binary
run: cargo build --verbose --release
env:
RUST_BACKTRACE: 1
- name: Build archive
shell: bash
run: |
mkdir archive
cp LICENSE README.md archive/
cd archive
if [[ "${{ matrix.build }}" == "linux-amd" ]]; then
cp "../target/release/catwrt-update" ./
tar -czf "${{ matrix.archive-name }}" LICENSE README.md catwrt-update
elif [[ "${{ matrix.build }}" == "linux-arm" ]]; then
cp "../target/aarch64-unknown-linux-musl/release/catwrt-update" ./
tar -czf "${{ matrix.archive-name }}" LICENSE README.md catwrt-update
else
cp "../target/release/catwrt-update" ./
tar -czf "${{ matrix.archive-name }}" LICENSE README.md catwrt-update
fi
- name: Upload archive
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.archive-name }}
path: archive/${{ matrix.archive-name }}