mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-05 03:30:03 +00:00
Merge pull request #178 from NobodyXu/ci
This commit is contained in:
commit
c33f195d5f
3 changed files with 27 additions and 6 deletions
9
.github/workflows/rust.yml
vendored
9
.github/workflows/rust.yml
vendored
|
@ -98,18 +98,15 @@ jobs:
|
|||
|
||||
- name: Test (Unix)
|
||||
if: ${{ matrix.test && matrix.os != 'windows-latest' }}
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
for bin in $bins; do ./${{ matrix.output }} binstall --no-confirm $bin; done
|
||||
./${{ matrix.output }} binstall --manifest-path . --no-confirm cargo-binstall
|
||||
env:
|
||||
bins: cargo-deb cargo-llvm-cov cargo-binstall
|
||||
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' }}
|
||||
|
|
22
ci-scripts/run_tests_unix.sh
Executable file
22
ci-scripts/run_tests_unix.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
bins="cargo-deb cargo-llvm-cov cargo-binstall"
|
||||
test_bins="cargo-deb cargo-llvm-cov"
|
||||
|
||||
# Install binaries using cargo-binstall
|
||||
for bin in $bins; do
|
||||
"./$1" binstall --log-level debug --no-confirm "$bin"
|
||||
done
|
||||
|
||||
# Test that the installed binaries can be run
|
||||
for bin in $test_bins; do
|
||||
"$HOME/.cargo/bin/$bin" --version
|
||||
done
|
||||
cargo binstall --help >/dev/null
|
||||
|
||||
# Install binaries using `--manifest-path`
|
||||
"./$1" binstall --log-level debug --manifest-path . --no-confirm cargo-binstall
|
||||
# Test that the installed binaries can be run
|
||||
cargo binstall --help >/dev/null
|
|
@ -44,6 +44,8 @@ fn untar<Filter: FnMut(&Path) -> bool>(
|
|||
tar.unpack(path)?;
|
||||
}
|
||||
|
||||
debug!("Untaring completed");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue