Change rust actions used

This commit is contained in:
ByteDream 2022-12-17 17:13:56 +01:00
parent 306019d8b8
commit 5de4a83e5d

View file

@ -16,17 +16,14 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
toolchain: x86_64-unknown-linux-musl toolchain: x86_64-unknown-linux-musl
platform: linux platform: linux
command: sudo apt install -y musl-tools
ext: ext:
- os: windows-latest - os: windows-latest
toolchain: x86_64-pc-windows-gnu toolchain: x86_64-pc-windows-gnu
platform: windows platform: windows
command:
ext: .exe ext: .exe
- os: macos-latest - os: macos-latest
toolchain: x86_64-apple-darwin toolchain: x86_64-apple-darwin
platform: darwin platform: darwin
command:
ext: ext:
steps: steps:
- name: Checkout - name: Checkout
@ -43,48 +40,39 @@ jobs:
target/ target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Additional command - name: Install system dependencies
if: matrix.command != '' if: matrix.platform == 'linux'
run: ${{ matrix.command }} run: sudo apt-get install musl-tools
- name: Install toolchain - name: Install toolchain
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@stable
with: with:
profile: minimal
toolchain: stable toolchain: stable
target: ${{ matrix.toolchain }} target: ${{ matrix.toolchain }}
default: true
overwrite: true
- name: Test - name: Test
uses: actions-rs/cargo@v1 run: cargo test --release --all-features --target ${{ matrix.toolchain }}
with:
command: test
args: --release --all-features
- name: Build - name: Build
uses: actions-rs/cargo@v1 run: cargo build --release --all-features --target ${{ matrix.toolchain }}
with:
command: build
args: --release --all-features
- name: Upload binary artifact - name: Upload binary artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: crunchy-cli_${{ matrix.platform }} name: crunchy-cli_${{ matrix.platform }}
path: ./target/release/crunchy-cli${{ matrix.ext }} path: ./target/${{ matrix.toolchain }}/release/crunchy-cli${{ matrix.ext }}
if-no-files-found: error if-no-files-found: error
- name: Upload manpages artifact - name: Upload manpages artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: manpages name: manpages
path: ./target/release/manpages path: ./target/${{ matrix.toolchain }}/release/manpages
if-no-files-found: error if-no-files-found: error
- name: Upload completions artifact - name: Upload completions artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: completions name: completions
path: ./target/release/completions path: ./target/${{ matrix.toolchain }}/release/completions
if-no-files-found: error if-no-files-found: error