Compare commits

...

5 Commits

Author SHA1 Message Date
Johannes Lorenz
835e1e7e20 Add version check 2025-03-22 18:24:06 +01:00
Johannes Lorenz
07de9f0a89 Fixup 2025-03-22 17:08:45 +01:00
Johannes Lorenz
07c8209e65 Fixup 2025-03-22 17:02:31 +01:00
Johannes Lorenz
884474b6e3 Refactor steps into action 2025-03-22 16:56:27 +01:00
Johannes Lorenz
db95ce2062 CI: Run LMMS
This runs `lmms --help` in the github CI. Further
checks, like importing an LMMS project to WAV via CLI, are conceivable.
2025-03-22 16:48:12 +01:00
3 changed files with 173 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
name: Extract Artifact
description: Waits for build, downloads and extracts the artifact
inputs:
check-name:
description: "Check name to wait for"
required: true
artifact-name:
description: "Name of the artifact to download"
required: true
github-token:
description: "GitHub token for authentication"
required: true
runs:
using: "composite"
steps:
- name: Wait for build
uses: lewagon/wait-on-check-action@v1.3.4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
check-name: ${{ inputs.check-name }}
repo-token: ${{ inputs.github-token }}
wait-interval: 30
- name: Download workflow artifact
uses: dawidd6/action-download-artifact@v6
with:
workflow: build.yml
name: ${{ inputs.artifact-name }}
- name: Extract artifact (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
chmod +x lmms-*.AppImage
./lmms-*.AppImage --appimage-extract
- name: Mount DMG (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
hdiutil attach lmms-*.dmg -mountpoint ~/tmpvolume
cp -R ~/tmpvolume/LMMS.app /tmp/
# Windows: Not working because (1) #7732 and (2) the unzip failed
#- name: Unpack installer (Windows)
# if: runner.os == 'Windows'
# run: Start-Process @(gci build/lmms-*.exe)[0] -ArgumentList /S -Wait

63
.github/workflows/run-help.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
---
name: run-help
'on': [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
help-linux:
strategy:
fail-fast: false
matrix:
config:
- arch: 'x86_64'
runner: 'ubuntu-latest'
suffix: ''
- arch: 'arm64'
runner: 'ubuntu-24.04-arm'
suffix: '-arm64'
name: help-linux-${{ matrix.config.arch }}
runs-on: ${{ matrix.config.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract artifact
uses: ./.github/actions/extract-artifact
with:
check-name: linux-${{ matrix.config.arch }}
artifact-name: linux${{ matrix.config.suffix }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Display help
run: |
cd squashfs-root/
./AppRun --help | grep "Usage: lmms"
help-macos:
strategy:
fail-fast: false
matrix:
config:
- arch: 'x86_64'
runner: 'macos-latest'
- arch: 'arm64'
runner: 'macos-latest'
name: help-macos-${{ matrix.config.arch }}
runs-on: ${{ matrix.config.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract artifact
uses: ./.github/actions/extract-artifact
with:
check-name: macos-${{ matrix.config.arch }}
artifact-name: macos-${{ matrix.config.arch }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Display help
run: |
/tmp/LMMS.app/Contents/MacOS/lmms --help | grep "Usage: lmms"
# Windows (does not work due to actions/extract-artifact issues)
# - name: Display help
# run: >
# $result = & "${env:ProgramFiles${{ matrix.config.programfiles-suffix }}}/LMMS/lmms.exe" "--help" |
# Select-String "Usage: lmms";
# if($result.Matches.Count -eq 0) { exit 1 }

63
.github/workflows/run-version.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
---
name: run-version
'on': [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
version-linux:
strategy:
fail-fast: false
matrix:
config:
- arch: 'x86_64'
runner: 'ubuntu-latest'
suffix: ''
- arch: 'arm64'
runner: 'ubuntu-24.04-arm'
suffix: '-arm64'
name: version-linux-${{ matrix.config.arch }}
runs-on: ${{ matrix.config.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract artifact
uses: ./.github/actions/extract-artifact
with:
check-name: linux-${{ matrix.config.arch }}
artifact-name: linux${{ matrix.config.suffix }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Display version
run: |
cd squashfs-root/
./AppRun --version | grep "Copyright (c) .* LMMS Developers"
version-macos:
strategy:
fail-fast: false
matrix:
config:
- arch: 'x86_64'
runner: 'macos-latest'
- arch: 'arm64'
runner: 'macos-latest'
name: version-macos-${{ matrix.config.arch }}
runs-on: ${{ matrix.config.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract artifact
uses: ./.github/actions/extract-artifact
with:
check-name: macos-${{ matrix.config.arch }}
artifact-name: macos-${{ matrix.config.arch }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Display version
run: |
/tmp/LMMS.app/Contents/MacOS/lmms --version | grep "Usage: lmms"
# Windows (does not work due to actions/extract-artifact issues)
# - name: Display version
# run: >
# $result = & "${env:ProgramFiles${{ matrix.config.programfiles-suffix }}}/LMMS/lmms.exe" "--version" |
# Select-String -Pattern "Copyright \(c\) .* LMMS Developers";
# if($result.Matches.Count -eq 0) { exit 1 }