Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Run LMMS #7427

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/actions/extract-artifact/action.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 changes: 63 additions & 0 deletions .github/workflows/run-help.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 63 additions & 0 deletions .github/workflows/run-version.yml
Original file line number Diff line number Diff line change
@@ -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 "Copyright (c) .* LMMS Developers"

# 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 }
Loading