Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into midi_ringbuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderVocke committed Jun 24, 2024
2 parents 7b548ba + 0b32f4f commit 9511b6d
Show file tree
Hide file tree
Showing 227 changed files with 5,247 additions and 2,754 deletions.
64 changes: 52 additions & 12 deletions .github/actions/build_package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ inputs:
description: "innosetup / linuxes / pyinstaller"
upload_name:
description: "if set, will upload the package(s) with the given name (prefix)"
upload_release_assets:
description: "Whether to upload release assets"
default: 'false'
release_upload_assets_url:
description: "Where to upload release assets"
default: ''

outputs:
output:
Expand All @@ -20,7 +26,7 @@ runs:

# Versions
- name: Determine version
shell: bash
shell: wrap-shell {0}
run: |
set -x
VERSION=$(cat $(find ${{ inputs.input_path }} -name version.txt -print -quit) | tr -d ' ')
Expand All @@ -33,7 +39,7 @@ runs:
# Linux packages
- name: Build .deb + pacman + .rpm
if: ${{ inputs.package_kind == 'linuxes' }}
shell: bash
shell: wrap-shell {0}
run: |
mkdir -p linux_packages
WORKDIR=$(pwd)
Expand All @@ -51,6 +57,7 @@ runs:
--maintainer "Sander Vocke <[email protected]>" \
${{ inputs.input_path }}=/opt \
$ROOTSRC/usr=/
echo "deb_package=linux_packages/$(ls shoopdaloop*.deb)" | tee -a $GITHUB_ENV
# RPM
fpm \
Expand All @@ -64,6 +71,7 @@ runs:
--maintainer "Sander Vocke <[email protected]>" \
${{ inputs.input_path }}=/opt \
$ROOTSRC/usr=/
echo "rpm_package=linux_packages/$(ls shoopdaloop*.rpm)" | tee -a $GITHUB_ENV
# Pacman
fpm \
Expand All @@ -78,25 +86,45 @@ runs:
--maintainer "Sander Vocke <[email protected]>" \
${{ inputs.input_path }}=/opt \
$ROOTSRC/usr=/
echo "pacman_package=linux_packages/$(ls shoopdaloop*.pkg*.tar*)" | tee -a $GITHUB_ENV
echo "pkg=linux_packages" | tee -a $GITHUB_ENV
- name: Upload RPM package
if: ${{ inputs.package_kind == 'linuxes' && inputs.upload_name }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.upload_name }}_rpm
path: linux_packages/shoopdaloop*.rpm
- name: Upload RPM package
path: ${{ env.rpm_package }}
- name: Upload deb package
if: ${{ inputs.package_kind == 'linuxes' && inputs.upload_name }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.upload_name }}_deb
path: linux_packages/shoopdaloop*.deb
- name: Upload RPM package
path: ${{ env.deb_package }}
- name: Upload pacman package
if: ${{ inputs.package_kind == 'linuxes' && inputs.upload_name }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.upload_name }}_pacman
path: linux_packages/shoopdaloop*pkg*.tar*
path: ${{ env.pacman_package }}
- name: Upload RPM package (release)
if: ${{ inputs.package_kind == 'linuxes' && inputs.upload_release_assets == 'true' }}
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ inputs.release_upload_assets_url }}
asset_path: ${{ env.rpm_package }}
- name: Upload deb package (release)
if: ${{ inputs.package_kind == 'linuxes' && inputs.upload_release_assets == 'true' }}
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ inputs.release_upload_assets_url }}
asset_path: ${{ env.deb_package }}
- name: Upload pacman package (release)
if: ${{ inputs.package_kind == 'linuxes' && inputs.upload_release_assets == 'true' }}
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ inputs.release_upload_assets_url }}
asset_path: ${{ env.pacman_package }}

# Windows installer (InnoSetup)
- name: Compile .ISS to .EXE Installer
Expand All @@ -107,7 +135,7 @@ runs:
options: /O+ /DMyAppVersion="${{ env.version }}.${{ env.gitversion }}"
- name: Move .EXE installer
if: ${{ inputs.package_kind == 'innosetup' }}
shell: bash
shell: wrap-shell {0}
run: |
ls distribution/innosetup
INSTALLER=$(find distribution/innosetup -name "ShoopDaLoop-*.exe")
Expand All @@ -118,13 +146,19 @@ runs:
with:
name: ${{ inputs.upload_name }}
path: ${{ env.pkg }}
- name: Upload .exe installer (release)
if: ${{ inputs.package_kind == 'innosetup' && inputs.upload_release_assets == 'true' }}
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ inputs.release_upload_assets_url }}
asset_path: ${{ env.pkg }}

# MacOS .dmg
- name: Build MacOSX .pkg
- name: Build MacOSX .dmg
if: ${{ inputs.package_kind == 'dmg' }}
shell: bash
shell: wrap-shell {0}
run: |
DMGFILE=shoopdaloop-${{ env.version }}.${{ env.gitversion }}.dmg
DMGFILE=shoopdaloop-${{ env.version }}.${{ env.gitversion }}.$(uname -m).dmg
create-dmg \
--volname "ShoopDaLoop" \
--volicon "src/shoopdaloop/resources/iconset/icon.icns" \
Expand All @@ -144,10 +178,16 @@ runs:
with:
name: ${{ inputs.upload_name }}
path: ${{ env.pkg }}
- name: Upload .dmg package (release)
if: ${{ inputs.package_kind == 'dmg' && inputs.upload_release_assets == 'true' }}
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ inputs.release_upload_assets_url }}
asset_path: ${{ env.pkg }}

- name: Find output
id: find_output
shell: bash
shell: wrap-shell {0}
run: |
echo "output=${{ env.pkg }}" | tee -a $GITHUB_OUTPUT
18 changes: 9 additions & 9 deletions .github/actions/build_pyinstaller/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ outputs:
runs:
using: "composite"
steps:
- name: PyInstaller
shell: bash
- name: Install wheel and PyInstaller
shell: wrap-shell {0}
run: |
export PIP="${{ inputs.python }} -m pip"
$PIP install --upgrade pip
$PIP install pyinstaller
$PIP install ${{ inputs.wheel }}
$PIP install --no-cache-dir pyinstaller
$PIP install --no-cache-dir ${{ inputs.wheel }}
- name: Find PyInstaller
shell: bash
shell: wrap-shell {0}
id: find
run: |
export PIP="${{ inputs.python }} -m pip"
Expand All @@ -42,19 +42,19 @@ runs:
echo "pyinstaller=$PYINSTALLER" | tee -a $GITHUB_OUTPUT
- name: Build
shell: bash
shell: wrap-shell {0}
id: pyinstaller
run: |
cd distribution/pyinstaller
${{ steps.find.outputs.pyinstaller }} shoopdaloop.spec
- name: Find distribution
shell: bash
shell: wrap-shell {0}
if: ${{ ! inputs.appbundle }}
run: echo "distribution=distribution/pyinstaller/dist" | tee -a $GITHUB_ENV

- name: Find app bundle
shell: bash
shell: wrap-shell {0}
if: ${{ inputs.appbundle }}
run: |
mkdir -p appbundle
Expand All @@ -63,7 +63,7 @@ runs:
- name: Set output
id: output
shell: bash
shell: wrap-shell {0}
run: |
echo "distribution=${{ env.distribution }}" | tee -a $GITHUB_OUTPUT
Loading

0 comments on commit 9511b6d

Please sign in to comment.