Skip to content

Commit

Permalink
Add fallback cross install if there is no verison specified (#10)
Browse files Browse the repository at this point in the history
* Update action.yml

* Update test.yml
  • Loading branch information
ClementTsang authored Sep 24, 2023
1 parent cd42566 commit a211c79
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ jobs:
[[ -d "test/hello_world/target/aarch64-unknown-linux-gnu/debug" ]] || (echo "debug is missing" && exit 1);
[[ -d "test/hello_world/target/aarch64-unknown-linux-gnu/release" ]] || (echo "release is missing" && exit 1);
- name: Test unspecified verison
uses: ./
with:
command: build
args: --target aarch64-unknown-linux-gnu
use-cross: true
directory: test/hello_world

test-git-cross:
name: "Test using git versions of cross"
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ runs:
CROSS_VERSION_ARG="--version=${{inputs.cross-version}}";
cargo install cross --locked ${CROSS_VERSION_ARG};
fi
else
# Install whatever is the latest version.
cargo install cross --locked
fi
- name: Execute the cargo/cross command.
Expand Down

0 comments on commit a211c79

Please sign in to comment.