ci: test if building with musl on Rust > 1.71 works again (#1302)

* ci: test if building with musl on Rust > 1.71 works again

* use cross instead?

* specify cross version to fix build issue

* Update build_releases.yml
This commit is contained in:
Clement Tsang 2023-09-24 03:11:08 -04:00 committed by GitHub
parent 5d455354dd
commit 4174012b8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,8 +61,7 @@ jobs:
- { - {
os: "ubuntu-20.04", os: "ubuntu-20.04",
target: "x86_64-unknown-linux-musl", target: "x86_64-unknown-linux-musl",
cross: false, cross: true,
rust: "1.71.0",
} }
- { - {
os: "ubuntu-20.04", os: "ubuntu-20.04",
@ -296,13 +295,8 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
info: info:
- { target: "x86_64-unknown-linux-gnu", cross: false, dpkg: amd64 } - { target: "x86_64-unknown-linux-gnu", dpkg: amd64 }
- { - { target: "x86_64-unknown-linux-musl", cross: true, dpkg: amd64 }
target: "x86_64-unknown-linux-musl",
cross: false,
dpkg: amd64,
rust: "1.71.0",
}
- { - {
target: "aarch64-unknown-linux-gnu", target: "aarch64-unknown-linux-gnu",
cross: true, cross: true,
@ -348,7 +342,7 @@ jobs:
with: with:
command: build command: build
args: --release --locked --verbose --features deploy --target ${{ matrix.info.target }} args: --release --locked --verbose --features deploy --target ${{ matrix.info.target }}
use-cross: ${{ matrix.info.cross }} use-cross: ${{ matrix.info.cross || false }}
cross-version: 0.2.5 cross-version: 0.2.5
- name: Move automatically generated completion/manpage - name: Move automatically generated completion/manpage
@ -362,7 +356,7 @@ jobs:
gzip ./manpage/btm.1 gzip ./manpage/btm.1
- name: Build Debian release (x86-64) - name: Build Debian release (x86-64)
if: matrix.info.cross == false if: startsWith(matrix.info.target, 'x86_64')
env: env:
BTM_GENERATE: true BTM_GENERATE: true
run: | run: |
@ -371,7 +365,7 @@ jobs:
cp ./target/${{ matrix.info.target }}/debian/bottom_*.deb . cp ./target/${{ matrix.info.target }}/debian/bottom_*.deb .
- name: Build Debian release (ARM) - name: Build Debian release (ARM)
if: matrix.info.cross == true if: startsWith(matrix.info.target, 'x86_64') != true
env: env:
BTM_GENERATE: true BTM_GENERATE: true
run: | run: |
@ -424,7 +418,7 @@ jobs:
matrix: matrix:
info: info:
- { target: "x86_64-unknown-linux-gnu" } - { target: "x86_64-unknown-linux-gnu" }
- { target: "x86_64-unknown-linux-musl", rust: "1.71.0" } - { target: "x86_64-unknown-linux-musl", cross: true }
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -443,9 +437,12 @@ jobs:
env: env:
BTM_GENERATE: true BTM_GENERATE: true
BTM_BUILD_RELEASE_CALLER: ${{ inputs.caller }} BTM_BUILD_RELEASE_CALLER: ${{ inputs.caller }}
CROSS_CONTAINER_IN_CONTAINER: true
with: with:
command: build command: build
use-cross: ${{ matrix.info.cross || false }}
args: --release --locked --verbose --features deploy --target ${{ matrix.info.target }} args: --release --locked --verbose --features deploy --target ${{ matrix.info.target }}
cross-version: 0.2.5
- name: Move automatically generated completion/manpage - name: Move automatically generated completion/manpage
shell: bash shell: bash
@ -458,7 +455,6 @@ jobs:
gzip ./manpage/btm.1 gzip ./manpage/btm.1
- name: Build rpm release - name: Build rpm release
if: matrix.info.cross == false
env: env:
BTM_GENERATE: true BTM_GENERATE: true
run: | run: |