mirror of https://github.com/atanunq/viu
Use latest actions
This commit is contained in:
parent
0b551d8854
commit
6ec9d204bd
|
@ -6,19 +6,19 @@ jobs:
|
|||
check-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: hecrj/setup-rust-action@master
|
||||
with:
|
||||
rust-version: stable
|
||||
components: clippy, rustfmt
|
||||
- uses: actions/checkout@v1
|
||||
- name: Format
|
||||
run: cargo fmt --all -- --check
|
||||
- name: Lint
|
||||
run: cargo clippy -- -D warnings
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
- uses: hecrj/setup-rust-action@master
|
||||
with:
|
||||
rust-version: stable
|
||||
components: clippy, rustfmt
|
||||
- uses: actions/checkout@v3
|
||||
- name: Format
|
||||
run: cargo fmt --all -- --check
|
||||
- name: Lint
|
||||
run: cargo clippy -- -D warnings
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
|
||||
build-and-deploy:
|
||||
needs: [check-and-test]
|
||||
|
@ -26,53 +26,53 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: macos-latest
|
||||
TARGET: x86_64-apple-darwin
|
||||
- os: macos-latest
|
||||
TARGET: x86_64-apple-darwin
|
||||
|
||||
- os: ubuntu-latest
|
||||
TARGET: arm-unknown-linux-musleabihf
|
||||
- os: ubuntu-latest
|
||||
TARGET: arm-unknown-linux-musleabihf
|
||||
|
||||
- os: ubuntu-latest
|
||||
TARGET: armv7-unknown-linux-musleabihf
|
||||
- os: ubuntu-latest
|
||||
TARGET: armv7-unknown-linux-musleabihf
|
||||
|
||||
- os: ubuntu-latest
|
||||
TARGET: aarch64-unknown-linux-musl
|
||||
- os: ubuntu-latest
|
||||
TARGET: aarch64-unknown-linux-musl
|
||||
|
||||
- os: ubuntu-latest
|
||||
TARGET: x86_64-unknown-linux-musl
|
||||
- os: ubuntu-latest
|
||||
TARGET: x86_64-unknown-linux-musl
|
||||
|
||||
- os: windows-latest
|
||||
TARGET: x86_64-pc-windows-msvc
|
||||
EXTENSION: .exe
|
||||
- os: windows-latest
|
||||
TARGET: x86_64-pc-windows-msvc
|
||||
EXTENSION: .exe
|
||||
|
||||
steps:
|
||||
- name: Building ${{ matrix.TARGET }}
|
||||
run: echo "${{ matrix.TARGET }}"
|
||||
- name: Building ${{ matrix.TARGET }}
|
||||
run: echo "${{ matrix.TARGET }}"
|
||||
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions-rs/toolchain@v1.0.1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: ${{ matrix.TARGET }}
|
||||
override: true
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: ${{ matrix.TARGET }}
|
||||
override: true
|
||||
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
use-cross: true
|
||||
command: build
|
||||
args: --verbose --release --target=${{ matrix.TARGET }}
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
use-cross: true
|
||||
command: build
|
||||
args: --verbose --release --target=${{ matrix.TARGET }}
|
||||
|
||||
- name: Rename
|
||||
run: cp target/${{ matrix.TARGET }}/release/viu${{ matrix.EXTENSION }} viu-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
|
||||
- name: Rename
|
||||
run: cp target/${{ matrix.TARGET }}/release/viu${{ matrix.EXTENSION }} viu-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
|
||||
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: viu-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
|
||||
path: viu-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: viu-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
|
||||
path: viu-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
|
||||
|
||||
- uses: softprops/action-gh-release@v1
|
||||
name: Upload binaries to release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: viu-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
|
||||
prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
- uses: softprops/action-gh-release@v1
|
||||
name: Upload binaries to release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: viu-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
|
||||
prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
|
|
Loading…
Reference in New Issue