Skip to content

Commit

Permalink
feat(ci/actions): update matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
xrelkd committed Dec 18, 2023
1 parent 41b80fd commit 2ee7137
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,20 @@ jobs:

include:
- target: aarch64-unknown-linux-musl
arch: arm64
arch_deb: arm64
arch_rpm: aarch64
os: ubuntu-latest
target_rustflags: "--codegen linker=aarch64-linux-gnu-gcc"

- target: armv7-unknown-linux-musleabihf
arch: armhf
arch_deb: armhf
arch_rpm: armhf # Fedora does not support armv7
os: ubuntu-latest
target_rustflags: "--codegen linker=arm-linux-gnueabihf-gcc"

- target: x86_64-unknown-linux-musl
arch: amd64
arch_deb: amd64
arch_rpm: x86_64
os: ubuntu-latest
target_rustflags: ""

Expand Down Expand Up @@ -92,46 +95,46 @@ jobs:
TARGET: ${{ matrix.target }}
REF: ${{ github.ref }}
OS: ${{ matrix.os }}
ARCH: ${{ matrix.arch }}
ARCH: ${{ matrix.arch_deb }}
TARGET_RUSTFLAGS: ${{ matrix.target_rustflags }}
run: ./dev-support/bin/prepare-deb-package
if: ${{ matrix.arch == 'amd64' }}
if: ${{ matrix.arch_deb == 'amd64' }}
shell: bash

- name: Create DEB Package
id: deb-package
uses: jiro4989/build-deb-action@v3
if: ${{ matrix.arch == 'amd64' }}
if: ${{ matrix.arch_deb == 'amd64' }}
with:
package: ${{ env.PACKAGE_NAME }}
package_root: .debpkg
maintainer: ${{ env.MAINTAINER }}
version: ${{ github.ref }}
arch: ${{ matrix.arch }}
arch: ${{ matrix.arch_deb }}
desc: ${{ env.PACKAGE_DESCRIPTION }}

- name: Prepare RPM Package
env:
TARGET: ${{ matrix.target }}
REF: ${{ github.ref }}
OS: ${{ matrix.os }}
ARCH: ${{ matrix.arch }}
ARCH: ${{ matrix.arch_rpm }}
TARGET_RUSTFLAGS: ${{ matrix.target_rustflags }}
run: ./dev-support/bin/prepare-rpm-package
if: ${{ matrix.arch == 'amd64' }}
if: ${{ matrix.arch_rpm == 'x86_64' }}
shell: bash

- name: Create RPM Package
id: rpm-package
uses: jiro4989/build-rpm-action@v2
if: ${{ matrix.arch == 'amd64' }}
if: ${{ matrix.arch_rpm == 'x86_64' }}
with:
summary: ${{ env.PACKAGE_DESCRIPTION }}
package: ${{ env.PACKAGE_NAME }}
package_root: .rpmpkg
maintainer: ${{ env.MAINTAINER }}
version: ${{ github.ref }}
arch: "x86_64"
arch: ${{ matrix.arch_rpm }}
desc: ${{ env.PACKAGE_DESCRIPTION }}

- name: Publish Package Archive
Expand All @@ -146,7 +149,7 @@ jobs:

- name: Publish DEB Package
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.arch == 'amd64' }}
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.arch_deb == 'amd64' }}
with:
draft: false
files: ${{ steps.deb-package.outputs.file_name }}
Expand All @@ -156,7 +159,7 @@ jobs:

- name: Publish RPM Package
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.arch == 'amd64' }}
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.arch_rpm == 'x86_64' }}
with:
draft: false
files: ${{ steps.rpm-package.outputs.file_name }}
Expand Down

0 comments on commit 2ee7137

Please sign in to comment.