Skip to content

cargo update && README sample code #28

cargo update && README sample code

cargo update && README sample code #28

Workflow file for this run

name: build
on:
push:
paths-ignore: ["**.md"]
branches: [ master ]
pull_request:
paths-ignore: ["**.md"]
branches: [ master ]
jobs:
build-all:
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- x86_64-pc-windows-gnu
- x86_64-linux-android
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- aarch64-linux-android
- armv7-unknown-linux-gnueabi
- armv7-unknown-linux-gnueabihf
- armv7-unknown-linux-musleabi
- armv7-unknown-linux-musleabihf
- armv7-linux-androideabi
- arm-unknown-linux-gnueabi
- arm-unknown-linux-gnueabihf
- arm-unknown-linux-musleabi
- arm-unknown-linux-musleabihf
- armv7-linux-androideabi
os: [ubuntu-20.04]
cross: [true]
include:
- target: x86_64-pc-windows-msvc
os: windows-latest
cross: false
- target: x86_64-apple-darwin
os: macos-latest
cross: false
- target: aarch64-apple-darwin
os: macos-latest
cross: false
- target: aarch64-apple-ios
os: macos-latest
cross: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
targets: ${{ matrix.target }}
- name: install cross
if: ${{ matrix.cross }}
run: cargo install cross --git https://github.com/cross-rs/cross
- name: build cross
if: ${{ matrix.cross }}
run: cross build --release -p kaminari-cmd --target=${{ matrix.target }}
- name: build native
if: ${{ !matrix.cross }}
run: cargo build --release -p kaminari-cmd --target=${{ matrix.target }}
- name: pack unix
if: "!contains(matrix.target, 'windows')"
run: |
mkdir -p build-${{ matrix.target }}
cd build-${{ matrix.target }}
tar -C ../target/${{ matrix.target }}/release -zcf kaminari-${{ matrix.target }}.tar.gz kaminaris kaminaric
- name: pack windows
if: "contains(matrix.target, 'windows')"
run: |
mkdir -p build-${{ matrix.target }}
cd build-${{ matrix.target }}
tar -C ../target/${{ matrix.target }}/release -zcf kaminari-${{ matrix.target }}.tar.gz kaminaris.exe kaminaric.exe
- name: upload
uses: actions/upload-artifact@v3
with:
name: kaminari-${{ matrix.target }}.tar.gz
path: build-${{ matrix.target }}/kaminari-${{ matrix.target }}.tar.gz