1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
name: AppImage Continuous
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:
env:
BUILD_TYPE: RelWithDebInfo
jobs:
linux-appimage-continuous-build:
name: Linux ${{ matrix.os.arch }} (Continuous build)
runs-on: ${{ matrix.os.label }}
strategy:
matrix:
os:
# x86_64 (https://github.com/actions/runner-images/tree/main/images/ubuntu)
- { arch: x86_64, label: ubuntu-24.04 }
# ARM64 (https://github.com/actions/partner-runner-images)
- { arch: aarch64, label: ubuntu-24.04-arm }
container: ghcr.io/pkgforge-dev/archlinux:latest
steps:
- name: Set environment variables
run: |
echo "REPO_USERNAME=${GITHUB_REPOSITORY//\//|}" >> $GITHUB_ENV
echo "Repository username is '${REPO_USERNAME}'"
- name: Install prerequisites
run: pacman -Syu --noconfirm sudo
- uses: actions/checkout@v5
- name: Build libcpuid
run: ./scripts/build_libcpuid.sh -t "$BUILD_TYPE"
- name: Build CPU-X
run: ./scripts/build_cpu_x.sh -s "$GITHUB_WORKSPACE" -t "$BUILD_TYPE" -i "$GITHUB_WORKSPACE/AppDir"
- name: Create AppImage
run: ./scripts/build_appimage.sh -s "$GITHUB_WORKSPACE" -a "$GITHUB_WORKSPACE/AppDir" -u "$REPO_USERNAME"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.os.arch }}
path: AppImage/CPU-X-*
linux-appimage-continuous-release:
name: Linux (Continuous release)
needs: linux-appimage-continuous-build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v5
- name: Download all artifacts
uses: actions/download-artifact@v5
with:
path: AppImage/
merge-multiple: true
- name: Display structure of downloaded files
run: ls -lhR AppImage/
- name: Delete previous continuous release
run: gh release delete continuous --cleanup-tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create continuous release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "AppImage/CPU-X-*.AppImage*"
body: |
:heavy_check_mark:CPU-X AppImage built from latest commit ([${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})). See [known issues](https://github.com/TheTumultuousUnicornOfDarkness/CPU-X/wiki/appimage).
commit: ${{ github.sha }}
draft: false
name: Continuous build
prerelease: true
removeArtifacts: true
replacesArtifacts: true
skipIfReleaseExists: false
tag: continuous
token: "${{ secrets.GITHUB_TOKEN }}"
|