Skip to content

Commit

Permalink
Fix typo in publishing build job & restore cross-compilation (#1430)
Browse files Browse the repository at this point in the history
* Fix typo in publishing build job

This prevented the cross-compilation targets from using the `cross`
binary for the compilation.

The script evaluated with `${{ matrix.job.cross }}` to:
```
  if [[ "" == "true" ]]; then
    cross build --release --target x86_64-unknown-linux-musl
  else
    cargo build --release --target x86_64-unknown-linux-musl
  fi
```

The correct result for `${{ matrix.job.use-cross }}` is:
```
  if [[ "true" == "true" ]]; then
    cross build --release --target x86_64-unknown-linux-musl
  else
    cargo build --release --target x86_64-unknown-linux-musl
  fi
```

* Restore previously failed cross-compilation targets

- Revert "Delete the remaining failing cross-compilation target"

  This reverts commit 2937f32.

- Revert "Delete another failing cross-compilation target"

  This reverts commit 4af8adf.

- Revert "Delete i686-unknown-linux-gnu job"

  This reverts commit eebdddd.

- Revert "Delete arm-unknown-linux-gnueabihf job"

  This reverts commit 9a2fa34.
  • Loading branch information
nickelc authored Jun 3, 2023
1 parent dda9a87 commit d327bad
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ jobs:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
use-cross: false
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
use-cross: true
- os: ubuntu-latest
target: i686-unknown-linux-gnu
use-cross: true
- os: ubuntu-latest
target: arm-unknown-linux-gnueabihf
use-cross: true
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
use-cross: true

steps:
- name: Installing Rust toolchain
Expand All @@ -42,7 +54,7 @@ jobs:
MACOSX_DEPLOYMENT_TARGET: 10.7
shell: bash
run: |
if [[ "${{ matrix.job.cross }}" == "true" ]]; then
if [[ "${{ matrix.job.use-cross }}" == "true" ]]; then
cross build --release --target ${{ matrix.job.target }}
else
cargo build --release --target ${{ matrix.job.target }}
Expand Down

0 comments on commit d327bad

Please sign in to comment.