Skip to content

Commit

Permalink
build: fix release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mahor1221 committed Jul 9, 2024
1 parent 7a77593 commit 65008ca
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ jobs:
- { os: ubuntu-latest, target: aarch64-unknown-linux-musl, cmd: cross }
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu, cmd: cargo }
- { os: ubuntu-latest, target: x86_64-unknown-linux-musl, cmd: cargo }
# - { os: windows-latest, target: aarch64-pc-windows-msvc }
# - { os: windows-latest, target: x86_64-pc-windows-msvc }
# - { os: windows-latest, target: aarch64-pc-windows-msvc, cmd: cross }
# - { os: windows-latest, target: x86_64-pc-windows-msvc, cmd: cargo }

runs-on: ${{ matrix.os }}
steps:
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, target: aarch64-unknown-linux-gnu }
- { os: ubuntu-latest, target: aarch64-unknown-linux-musl }
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
- { os: ubuntu-latest, target: x86_64-unknown-linux-musl }
- { os: windows-latest, target: aarch64-pc-windows-msvc }
- { os: windows-latest, target: x86_64-pc-windows-msvc }
- { os: ubuntu-latest, target: aarch64-unknown-linux-gnu, cmd: cross }
- { os: ubuntu-latest, target: aarch64-unknown-linux-musl, cmd: cross }
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu, cmd: cargo }
- { os: ubuntu-latest, target: x86_64-unknown-linux-musl, cmd: cargo }
- { os: windows-latest, target: aarch64-pc-windows-msvc, cmd: cross }
- { os: windows-latest, target: x86_64-pc-windows-msvc, cmd: cargo }
# - { os: macos-latest, target: aarch64-apple-darwin }
# - { os: macos-latest, target: x86_64-apple-darwin }
# - { os: macos-latest, target: universal-apple-darwin }
Expand All @@ -87,10 +87,14 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- if: matrix.os != 'windows-latest'
- if: matrix.cmd == 'cross'
uses: taiki-e/install-action@v2
with:
tool: cross
- if: matrix.target == 'x86_64-unknown-linux-gnu'
uses: taiki-e/install-action@v2
with:
tool: cargo-deb,cross
tool: cargo-deb

- name: Install prerequisites
shell: bash
Expand Down Expand Up @@ -122,12 +126,10 @@ jobs:
esac
- name: Build debian package
if: |
matrix.target == 'aarch64-unknown-linux-gnu' ||
matrix.target == 'x86_64-unknown-linux-gnu'
if: matrix.target == 'x86_64-unknown-linux-gnu'
id: deb
run: |
cross build --release --target ${{ matrix.target }} --all
${{ matrix.cmd }} build --release --target ${{ matrix.target }} --all
cargo deb --no-build --target ${{ matrix.target }}
dir="target/${{ matrix.target }}/debian"
arch="$(a=${{ matrix.target }} && echo "${a%%-*}")"
Expand Down

0 comments on commit 65008ca

Please sign in to comment.