mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 13:38:43 +00:00
Fix job changed-files
(#1732)
* Fix job `changed-files` Convert `ALL_CHANGED_FILES` to multiple lines before processing Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Run e2e-tests and unit-tests on aarch64-apple-darwin Since the CI now uses M1 instead of x86_64, built a native executable instead of relying on rosetta Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Run unit-tests on Linux-only Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> --------- Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
6622bf1ae3
commit
7941387b73
2 changed files with 7 additions and 19 deletions
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
|
@ -56,7 +56,6 @@ jobs:
|
||||||
dir_names: true
|
dir_names: true
|
||||||
dir_names_exclude_current_dir: true
|
dir_names_exclude_current_dir: true
|
||||||
dir_names_max_depth: 2
|
dir_names_max_depth: 2
|
||||||
separator: "\n"
|
|
||||||
|
|
||||||
- name: List all changed files
|
- name: List all changed files
|
||||||
id: list-changed-files
|
id: list-changed-files
|
||||||
|
@ -64,27 +63,16 @@ jobs:
|
||||||
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
crates_changed="$(echo "$ALL_CHANGED_FILES" | grep crates | cut -d / -f 2 || echo)"
|
crates_changed="$(for file in $ALL_CHANGED_FILES; do echo $file; done | grep crates | cut -d / -f 2 || echo)"
|
||||||
has_detect_target_changed="$(echo "$crates_changed" | grep -q detect-targets && echo true || echo false)"
|
has_detect_target_changed="$(echo "$crates_changed" | grep -q detect-targets && echo true || echo false)"
|
||||||
echo "crates_changed=${crates_changed//$'\n'/ }" | tee -a "$GITHUB_OUTPUT"
|
echo "crates_changed=${crates_changed//$'\n'/ }" | tee -a "$GITHUB_OUTPUT"
|
||||||
echo "has_detect_target_changed=$has_detect_target_changed" | tee -a "$GITHUB_OUTPUT"
|
echo "has_detect_target_changed=$has_detect_target_changed" | tee -a "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
unit-tests:
|
unit-tests:
|
||||||
needs: changed-files
|
needs: changed-files
|
||||||
strategy:
|
runs-on: ubuntu-latest
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- target: x86_64-apple-darwin
|
|
||||||
os: macos-14
|
|
||||||
- target: x86_64-unknown-linux-gnu
|
|
||||||
os: ubuntu-latest
|
|
||||||
- target: x86_64-pc-windows-msvc
|
|
||||||
os: windows-latest
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
env:
|
env:
|
||||||
CARGO_BUILD_TARGET: ${{ matrix.target }}
|
CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -118,7 +106,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- target: x86_64-apple-darwin
|
- target: aarch64-apple-darwin
|
||||||
os: macos-14
|
os: macos-14
|
||||||
- target: x86_64-unknown-linux-gnu
|
- target: x86_64-unknown-linux-gnu
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
|
@ -158,7 +146,7 @@ jobs:
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
- target: x86_64-unknown-linux-musl
|
- target: x86_64-unknown-linux-musl
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
- target: aarch64-apple-darwin
|
- target: x86_64-apple-darwin
|
||||||
os: macos-14
|
os: macos-14
|
||||||
- target: aarch64-pc-windows-msvc
|
- target: aarch64-pc-windows-msvc
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
4
.github/workflows/release-packages.yml
vendored
4
.github/workflows/release-packages.yml
vendored
|
@ -27,9 +27,9 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- { o: macos-14, t: x86_64-apple-darwin, r: true }
|
- { o: macos-14, t: x86_64-apple-darwin }
|
||||||
- { o: macos-14, t: x86_64h-apple-darwin }
|
- { o: macos-14, t: x86_64h-apple-darwin }
|
||||||
- { o: macos-14, t: aarch64-apple-darwin }
|
- { o: macos-14, t: aarch64-apple-darwin, r: true }
|
||||||
- {
|
- {
|
||||||
o: ubuntu-latest,
|
o: ubuntu-latest,
|
||||||
t: x86_64-unknown-linux-gnu,
|
t: x86_64-unknown-linux-gnu,
|
||||||
|
|
Loading…
Add table
Reference in a new issue