[CI] Fix jobs dependencies #981
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: AppImage Continuous | |
on: | |
push: | |
branches: | |
- master | |
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-22.04 } | |
# ARM64 (https://github.com/actions/partner-runner-images) | |
- { arch: aarch64, label: ubuntu-22.04-arm } | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: abbbi/github-actions-tune@v1 | |
- name: Build libcpuid | |
run: bash -x ./scripts/build_libcpuid.sh "$BUILD_TYPE" | |
- name: Build CPU-X | |
run: bash -x ./scripts/build_cpu_x.sh "$BUILD_TYPE" "$GITHUB_WORKSPACE" "$GITHUB_WORKSPACE/AppDir" | |
- name: Package CPU-X as an AppImage | |
run: bash -x ./scripts/build_appimage.sh "$GITHUB_WORKSPACE" "$GITHUB_WORKSPACE/AppDir" | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-${{ matrix.os.arch }} | |
path: AppImage/CPU-X-${{ matrix.os.arch }}.AppImage* | |
linux-appimage-continuous-release: | |
name: Linux (Continuous release) | |
needs: linux-appimage-continuous-build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Linux AArch64 artifacts | |
uses: dawidd6/action-download-artifact@v6 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
commit: ${{ github.sha }} | |
workflow: appimage_continuous.yml | |
name: linux-aarch64 | |
path: AppImage/ | |
- name: Download Linux x86_64 artifacts | |
uses: dawidd6/action-download-artifact@v6 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
commit: ${{ github.sha }} | |
workflow: appimage_continuous.yml | |
name: linux-x86_64 | |
path: AppImage/ | |
- name: Delete previous continuous release | |
uses: dev-drprasad/[email protected] | |
with: | |
tag_name: continuous | |
delete_release: true | |
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 }}" |