Skip to content

feat: add padding

feat: add padding #110

Workflow file for this run

name: release-build
on:
workflow_dispatch:
push:
tags:
- "v*"
branches: [master]
paths:
- ".github/workflows/release-build.yml"
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v1
- name: Run tests
run: cargo test --verbose
cross:
needs: test
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
name: shuttle-x86_64-unknown-linux-musl.tgz
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
name: shuttle-aarch64-unknown-linux-musl.tgz
- os: ubuntu-latest
target: i686-unknown-linux-musl
name: shuttle-i686-unknown-linux-musl.tgz
- os: ubuntu-latest
target: armv7-unknown-linux-musleabihf
name: shuttle-armv7-unknown-linux-musleabihf.tgz
- os: macOS-latest
target: x86_64-apple-darwin
name: shuttle-x86_64-apple-darwin.tgz
- os: macOS-latest
target: aarch64-apple-darwin
name: shuttle-aarch64-apple-darwin.tgz
- os: windows-latest
target: x86_64-pc-windows-msvc
name: shuttle-x86_64-pc-windows-msvc.zip
- os: windows-latest
target: i686-pc-windows-msvc
name: shuttle-i686-pc-windows-msvc.zip
permissions:
contents: write
runs-on: ${{ matrix.os }}
env:
RUST_BACKTRACE: full
continue-on-error: true
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
profile: minimal
target: ${{ matrix.target }}
- name: Setup | Rustup
run: rustup target add ${{ matrix.target }}
- name: Build | Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --verbose --target ${{ matrix.target }}
use-cross: true
- name: Post Build | Prepare artifacts [Windows]
if: matrix.os == 'windows-latest'
run: |
xcopy examples target\${{ matrix.target }}\release\examples /s /e /y /i
cd target/${{ matrix.target }}/release
strip shuttles.exe
strip shuttlec.exe
7z a ../../../${{ matrix.name }} shuttles.exe shuttlec.exe examples
cd -
- name: Post Build | Prepare artifacts [unix]
if: matrix.os != 'windows-latest'
run: |
cp -r examples target/${{ matrix.target }}/release
cd target/${{ matrix.target }}/release
strip shuttles && strip shuttlec || true
tar czvf ../../../${{ matrix.name }} shuttles shuttlec examples
cd -
- name: Deploy | Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}
- name: Publish Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.name }}
generate_release_notes: true
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}