ci: remove git hash and nightly tag from deb file name (#970)
* ci: switch deb nightly builds back to the same string as normal Easier to stay consistent, I guess. * disable cache for cargo deb * reenable cache * nvm
This commit is contained in:
parent
f415fb08bc
commit
6e2b276836
|
@ -330,15 +330,16 @@ jobs:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
target: ${{ matrix.info.target }}
|
target: ${{ matrix.info.target }}
|
||||||
|
|
||||||
- name: Enable Rust cache
|
# - name: Enable Rust cache
|
||||||
if: matrix.info.cross != true
|
# if: matrix.info.cross != true
|
||||||
timeout-minutes: 5
|
# timeout-minutes: 5
|
||||||
continue-on-error: true
|
# continue-on-error: true
|
||||||
uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # 2.2.0
|
# uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # 2.2.0
|
||||||
with:
|
# with:
|
||||||
shared-key: build-cache-${{ matrix.info.target }}
|
# shared-key: build-cache-${{ matrix.info.target }}
|
||||||
save-if: "false"
|
# save-if: "false"
|
||||||
|
|
||||||
|
# TODO: Could I use the previous jobs to skip this call?
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: ClementTsang/cargo-action@v0.0.3
|
uses: ClementTsang/cargo-action@v0.0.3
|
||||||
env:
|
env:
|
||||||
|
@ -360,28 +361,13 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
gzip ./manpage/btm.1
|
gzip ./manpage/btm.1
|
||||||
|
|
||||||
- name: Prepare custom version if needed
|
|
||||||
if: ${{ inputs.caller == 'nightly' }}
|
|
||||||
id: custom-version
|
|
||||||
run: |
|
|
||||||
if [[ ${{ matrix.info.cross }} == false ]]; then
|
|
||||||
# x86-64 can be directly executed, so we can do the easy way out.
|
|
||||||
VERSION=$(./target/${{ matrix.info.target }}/release/btm -V | awk '{print $2}')
|
|
||||||
echo "CUSTOM_VERSION_ARG='--deb-version=$VERSION'" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
VER=$(grep -m1 "^version" Cargo.toml | awk '{print $3}' | tr -d \") # NB: Assumes the first instance of version is the build version
|
|
||||||
APPEND=nightly-${GITHUB_SHA::8}
|
|
||||||
echo "CUSTOM_VERSION_ARG='--deb-version=$VER-$APPEND'" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Build Debian release (x86-64)
|
- name: Build Debian release (x86-64)
|
||||||
if: matrix.info.cross == false
|
if: matrix.info.cross == false
|
||||||
env:
|
env:
|
||||||
BTM_GENERATE: true
|
BTM_GENERATE: true
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-deb --version 1.41.3 --locked
|
cargo install cargo-deb --version 1.41.3 --locked
|
||||||
VERSION_ARG=$(echo ${{ steps.custom-version.outputs.CUSTOM_VERSION_ARG }} | tr -d \')
|
cargo deb --no-build --target ${{ matrix.info.target }}
|
||||||
cargo deb --no-build --target ${{ matrix.info.target }} $VERSION_ARG
|
|
||||||
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)
|
||||||
|
@ -390,8 +376,7 @@ jobs:
|
||||||
BTM_GENERATE: true
|
BTM_GENERATE: true
|
||||||
run: |
|
run: |
|
||||||
docker pull ${{ matrix.info.container }}
|
docker pull ${{ matrix.info.container }}
|
||||||
VERSION_ARG=$(echo ${{ steps.custom-version.outputs.CUSTOM_VERSION_ARG }} | tr -d \')
|
docker run -t --rm --mount type=bind,source="$(pwd)",target=/volume ${{ matrix.info.container }} "--no-build --variant ${{ matrix.info.dpkg }} --target ${{ matrix.info.target }}" "/volume"
|
||||||
docker run -t --rm --mount type=bind,source="$(pwd)",target=/volume ${{ matrix.info.container }} "--no-build --variant ${{ matrix.info.dpkg }} --target ${{ matrix.info.target }} $VERSION_ARG" "/volume"
|
|
||||||
cp ./target/${{ matrix.info.target }}/debian/bottom-*.deb .
|
cp ./target/${{ matrix.info.target }}/debian/bottom-*.deb .
|
||||||
TMP_NAME=$(find bottom-*.deb)
|
TMP_NAME=$(find bottom-*.deb)
|
||||||
VERSION=${{ matrix.info.dpkg }}
|
VERSION=${{ matrix.info.dpkg }}
|
||||||
|
|
Loading…
Reference in New Issue