Skip to content

Commit

Permalink
Always pass "+toolchain" to cargo or cross
Browse files Browse the repository at this point in the history
I don't think this was actually using the specified toolchain, at least not
when cross compiling.
  • Loading branch information
autarch committed Apr 22, 2023
1 parent 356ca41 commit d788e00
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.0.7 - 2023-04-21

- The toolchain argument was (probably) not being respected with cross builds,
though it's hard to be sure since none of the output from past CI runs I've
looked at it includes the toolchain version in the output. But now the
toolchain version is explicitly passed to all `cargo` and `cross` commands.

## 0.0.6 - 2023-04-21

- When the `strip` parameter was true, stripping binaries could fail if there
Expand Down
9 changes: 4 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ runs:
with:
targets: ${{ inputs.target }}
toolchain: ${{ inputs.toolchain }}
if: ${{ steps.determine-cross-compile.outputs.needs-cross == 'false' }}
- name: Install cross if cross-compiling (*nix)
shell: bash
run: install-cross-nix.sh
Expand All @@ -64,7 +63,7 @@ runs:
- name: Run tests (*nix)
shell: bash
run: |
${{ steps.set-build-command.outputs.build-command }} test ${{ inputs.args }} --target ${{ inputs.target }}
${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} test ${{ inputs.args }} --target ${{ inputs.target }}
if: ${{ inputs.command != 'build' && runner.os != 'Windows' }}
# We want to run in Powershell on Windows to make sure we compile in a
# native Windows environment. Some things won't compile properly under
Expand All @@ -73,17 +72,17 @@ runs:
- name: Run tests (Windows)
shell: powershell
run: |
& ${{ steps.set-build-command.outputs.build-command }} test ${{ inputs.args }} --target ${{ inputs.target }}
& ${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} test ${{ inputs.args }} --target ${{ inputs.target }}
if: ${{ inputs.command != 'build' && runner.os == 'Windows' }}
- name: Build binary (*nix)
shell: bash
run: |
${{ steps.set-build-command.outputs.build-command }} build ${{ inputs.args }} --target ${{ inputs.target }}
${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} build ${{ inputs.args }} --target ${{ inputs.target }}
if: ${{ inputs.command != 'test' && runner.os != 'Windows' }}
- name: Build binary (Windows)
shell: powershell
run: |
& ${{ steps.set-build-command.outputs.build-command }} build ${{ inputs.args }} --target ${{ inputs.target }}
& ${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} build ${{ inputs.args }} --target ${{ inputs.target }}
if: ${{ inputs.command != 'test' && runner.os == 'Windows' }}
- name: Strip binary
shell: bash
Expand Down

0 comments on commit d788e00

Please sign in to comment.