Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
u
Browse files Browse the repository at this point in the history
Umio-Yasuno committed Jan 28, 2025
1 parent b57c687 commit f41863a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -34,9 +34,9 @@ jobs:
- name: Runner Arch
run: |
# https://stackoverflow.com/questions/52996949/how-can-i-find-the-current-rust-compilers-default-llvm-target-triple
echo "RUNNER_ARCH=$(rustc -vV | sed -n 's|host: ||p')" >> $GITHUB_ENV
echo "RUSTC_HOST_ARCH=$(rustc -vV | sed -n 's|host: ||p')" >> $GITHUB_ENV
- name: Print Runner Arch
run: echo "$RUNNER_ARCH"
run: echo "$RUSTC_HOST_ARCH"
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -45,7 +45,7 @@ jobs:
outputs:
version: ${{ env.VERSION }}
pkg_ver: ${{ env.PKG_VER }}
runner_arch: ${{ env.RUNNER_ARCH }}
rustc_host_arch: ${{ env.RUSTC_HOST_ARCH }}

build:
name: build
@@ -54,7 +54,7 @@ jobs:
APPIMAGETOOL: tools/appimagetool
VERSION: ${{needs.create-release.outputs.version}}
PKG_VER: ${{needs.create-release.outputs.pkg_ver}}
RUNNER_ARCH: ${{needs.create-release.outputs.runner_arch}}
RUSTC_HOST_ARCH: ${{needs.create-release.outputs.rustc_host_arch}}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
@@ -73,7 +73,7 @@ jobs:
- name: Download appimagetool
run: |
mkdir tools
if [ "${RUNNER_ARCH}" == "x86_64-unknown-linux-gnu" ]; then
if [ "${RUSTC_HOST_ARCH}" == "x86_64-unknown-linux-gnu" ]; then
curl -o $APPIMAGETOOL -L -O https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
else
curl -o $APPIMAGETOOL -L -O https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage
@@ -94,7 +94,7 @@ jobs:
run: |
TGZ_NAME="amdgpu_top-${{ env.PKG_VER }}-x86_64-unknown-linux-gnu.tar.gz"
if ! [ "${RUNNER_ARCH}" == "x86_64-unknown-linux-gnu" ]; then
if ! [ "${RUSTC_HOST_ARCH}" == "x86_64-unknown-linux-gnu" ]; then
TGZ_NAME="amdgpu_top-${{ env.PKG_VER }}-aarch64-unknown-linux-gnu.tar.gz"
fi
@@ -108,7 +108,7 @@ jobs:
run: |
mold -run cargo deb -- --no-default-features --features="package"
if [ "${RUNNER_ARCH}" == "x86_64-unknown-linux-gnu" ]; then
if [ "${RUSTC_HOST_ARCH}" == "x86_64-unknown-linux-gnu" ]; then
gh release upload "$VERSION" ./target/debian/amdgpu-top_${{ env.PKG_VER }}-1_amd64.deb
else
gh release upload "$VERSION" ./target/debian/amdgpu-top_${{ env.PKG_VER }}-1_arm64.deb
@@ -120,7 +120,7 @@ jobs:
run: |
mold -run cargo generate-rpm
if [ "${RUNNER_ARCH}" == "x86_64-unknown-linux-gnu" ]; then
if [ "${RUSTC_HOST_ARCH}" == "x86_64-unknown-linux-gnu" ]; then
gh release upload "$VERSION" ./target/generate-rpm/amdgpu_top-${{ env.PKG_VER }}-1.x86_64.rpm
else
gh release upload "$VERSION" ./target/generate-rpm/amdgpu_top-${{ env.PKG_VER }}-1.aarch64.rpm
@@ -133,7 +133,7 @@ jobs:
PATH=$PATH:$PWD/tools/
mold -run cargo appimage --no-default-features --features="package"
if [ "${RUNNER_ARCH}" == "x86_64-unknown-linux-gnu" ]; then
if [ "${RUSTC_HOST_ARCH}" == "x86_64-unknown-linux-gnu" ]; then
cp ./target/appimage/amdgpu_top.AppImage amdgpu_top-x86_64.AppImage
gh release upload "$VERSION" amdgpu_top-x86_64.AppImage
else
@@ -147,7 +147,7 @@ jobs:
run: |
mold -run cargo deb -- --no-default-features --features="tui, json"
if [ "${RUNNER_ARCH}" == "x86_64-unknown-linux-gnu" ]; then
if [ "${RUSTC_HOST_ARCH}" == "x86_64-unknown-linux-gnu" ]; then
mv ./target/debian/amdgpu-top{,_without_gui}_${{ env.PKG_VER }}-1_amd64.deb
gh release upload "$VERSION" ./target/debian/amdgpu-top_without_gui_${{ env.PKG_VER }}-1_amd64.deb
else

0 comments on commit f41863a

Please sign in to comment.