mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-18 01:40:03 +00:00
Remame workflows for clarity
This commit is contained in:
parent
9b26fea231
commit
38ce26d0c4
2 changed files with 2 additions and 2 deletions
.github/workflows
137
.github/workflows/build-and-integration-tests.yml
vendored
Normal file
137
.github/workflows/build-and-integration-tests.yml
vendored
Normal file
|
@ -0,0 +1,137 @@
|
|||
name: Build and integration tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
tags: [ 'v*' ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and Test
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-latest
|
||||
output: cargo-binstall
|
||||
archive: tgz
|
||||
use-cross: false
|
||||
test: true
|
||||
- target: x86_64-apple-darwin
|
||||
os: macos-latest
|
||||
output: cargo-binstall
|
||||
archive: zip
|
||||
use-cross: false
|
||||
test: true
|
||||
- target: aarch64-apple-darwin
|
||||
os: macos-latest
|
||||
output: cargo-binstall
|
||||
archive: zip
|
||||
use-cross: false
|
||||
test: false
|
||||
- target: x86_64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
output: cargo-binstall.exe
|
||||
archive: zip
|
||||
use-cross: false
|
||||
test: false
|
||||
- target: x86_64-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
output: cargo-binstall
|
||||
archive: tgz
|
||||
use-cross: false
|
||||
test: true
|
||||
- target: armv7-unknown-linux-musleabihf
|
||||
os: ubuntu-20.04
|
||||
output: cargo-binstall
|
||||
archive: tgz
|
||||
use-cross: true
|
||||
test: false
|
||||
- target: aarch64-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
output: cargo-binstall
|
||||
archive: tgz
|
||||
use-cross: true
|
||||
test: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: FranzDiebold/github-env-vars-action@v1.2.1
|
||||
|
||||
- name: Configure toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly
|
||||
target: ${{ matrix.target }}
|
||||
override: true
|
||||
|
||||
- name: Configure caching
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
key: ${{ matrix.os }}-${{ matrix.target }}
|
||||
path: |
|
||||
${{ env.HOME }}/.cargo/git
|
||||
${{ env.HOME }}/.cargo/registry
|
||||
target
|
||||
|
||||
- name: Install musl-tools
|
||||
if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
|
||||
run: sudo apt-get install -y musl-tools
|
||||
|
||||
- name: Build release
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --target ${{ matrix.target }} --release
|
||||
use-cross: ${{ matrix.use-cross }}
|
||||
|
||||
- name: Copy and rename utility
|
||||
run: cp target/${{ matrix.target }}/release/${{ matrix.output }} ${{ matrix.output }}
|
||||
|
||||
- name: Test (Unix)
|
||||
if: ${{ matrix.test && matrix.os != 'windows-latest' }}
|
||||
run: ./ci-scripts/run_tests_unix.sh ${{ matrix.output }}
|
||||
|
||||
- name: Test (Windows)
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
run: |
|
||||
./${{ matrix.output }} binstall --no-confirm cargo-binstall
|
||||
cargo binstall --help
|
||||
./${{ matrix.output }} binstall --manifest-path . --no-confirm cargo-binstall
|
||||
cargo binstall --help
|
||||
|
||||
- name: Create archive (tgz, linux)
|
||||
if: ${{ matrix.os != 'macos-latest' && matrix.os != 'windows-latest' }}
|
||||
run: tar -czvf cargo-binstall-${{ matrix.target }}.tgz ${{ matrix.output }}
|
||||
|
||||
- name: Create archive (zip, windows)
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
run: tar.exe -a -c -f cargo-binstall-${{ matrix.target }}.zip ${{ matrix.output }}
|
||||
|
||||
- name: Create archive (zip, macos)
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
run: zip cargo-binstall-${{ matrix.target }}.zip ${{ matrix.output }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: cargo-binstall-${{ matrix.target }}.${{ matrix.archive }}
|
||||
path: cargo-binstall-${{ matrix.target }}.${{ matrix.archive }}
|
||||
|
||||
- name: Upload binary to release
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: cargo-binstall-${{ matrix.target }}.${{ matrix.archive }}
|
||||
asset_name: cargo-binstall-${{ matrix.target }}.${{ matrix.archive }}
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
Loading…
Add table
Add a link
Reference in a new issue