Skip to content

Commit

Permalink
try dpf-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Oct 31, 2023
1 parent 8f4d8c3 commit 33dd71c
Showing 1 changed file with 142 additions and 133 deletions.
275 changes: 142 additions & 133 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ env:

jobs:
linux-x86_64:
strategy:
matrix:
target: [linux-x86_64]
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
Expand All @@ -22,150 +25,156 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install git+https://github.com/Wasted-Audio/hvcc.git@${{ env.HVCC_VERSION }}
sudo apt-get update -qq
sudo apt-get install -yqq libgl1-mesa-dev
# sudo apt-get update -qq
# sudo apt-get install -yqq libgl1-mesa-dev
- name: Build plugins
- name: Export C/C++
run: |
hvcc wstd_eq.pd -n WSTD_EQ -m wstd_eq.json -o WSTD_EQ -g dpf -p dep/heavylib/ dep/ --copyright "Copyright (c) Wasted Audio 2023 - GPL-3.0-or-later"
cp override/* WSTD_EQ/plugin/source/
make -C WSTD_EQ WITH_LTO=true -j $(nproc)
- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
id: slug1
run: echo "action_tag=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set tag (release)
if: startsWith(github.ref, 'refs/tags/')
id: slug2
run: echo "action_tag=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
- name: Pack binaries
run: |
cd WSTD_EQ
mv bin WSTD_EQ
tar -c -h -z -f ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.action_tag }}.tar.gz WSTD_EQ/
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.action_tag }}
path: |
WSTD_EQ/*.tar.gz
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
- name: Build plugins
uses: distrho/dpf-makefile-action@v1
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
WSTD_EQ/*.tar.gz
target: ${{ matrix.target }}
dpf_path: 'dep/dpf'
extraargs: '-C WSTD_EQ'

win64:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install git+https://github.com/Wasted-Audio/hvcc.git@${{ env.HVCC_VERSION }}
sudo apt-get update -qq
sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
# - name: Set sha8 (non-release)
# if: startsWith(github.ref, 'refs/tags/') != true
# id: slug1
# run: echo "action_tag=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
# - name: Set tag (release)
# if: startsWith(github.ref, 'refs/tags/')
# id: slug2
# run: echo "action_tag=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV

- name: Build win64 cross-compiled plugins
env:
CC: x86_64-w64-mingw32-gcc
CXX: x86_64-w64-mingw32-g++
EXE_WRAPPER: wine
PKG_CONFIG: "false"
WINEDEBUG: "-all"
run: |
hvcc wstd_eq.pd -n WSTD_EQ -m wstd_eq.json -o WSTD_EQ -g dpf -p dep/heavylib/ dep/ --copyright "Copyright (c) Wasted Audio 2023 - GPL-3.0-or-later"
cp override/* WSTD_EQ/plugin/source/
make -C WSTD_EQ WITH_LTO=true -j $(nproc)
# - name: Pack binaries
# run: |
# cd WSTD_EQ
# mv bin WSTD_EQ
# tar -c -h -z -f ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.action_tag }}.tar.gz WSTD_EQ/
# - uses: actions/upload-artifact@v3
# with:
# name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.action_tag }}
# path: |
# WSTD_EQ/*.tar.gz
# - uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# tag_name: ${{ github.ref_name }}
# name: ${{ github.ref_name }}
# draft: false
# prerelease: false
# files: |
# WSTD_EQ/*.tar.gz

- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
id: slug1
run: echo "action_tag=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set tag (release)
if: startsWith(github.ref, 'refs/tags/')
id: slug2
run: echo "action_tag=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
- name: Pack binaries
run: |
cd WSTD_EQ
mv bin WSTD_EQ
tar -c -h -z -f ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.action_tag }}.tar.gz WSTD_EQ/
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.action_tag }}
path: |
WSTD_EQ/*.tar.gz
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
WSTD_EQ/*.tar.gz
# win64:
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: 3.9
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# python -m pip install git+https://github.com/Wasted-Audio/hvcc.git@${{ env.HVCC_VERSION }}
# sudo apt-get update -qq
# sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable

macos-universal:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install git+https://github.com/Wasted-Audio/hvcc.git@${{ env.HVCC_VERSION }}
# - name: Build win64 cross-compiled plugins
# env:
# CC: x86_64-w64-mingw32-gcc
# CXX: x86_64-w64-mingw32-g++
# EXE_WRAPPER: wine
# PKG_CONFIG: "false"
# WINEDEBUG: "-all"
# run: |
# hvcc wstd_eq.pd -n WSTD_EQ -m wstd_eq.json -o WSTD_EQ -g dpf -p dep/heavylib/ dep/ --copyright "Copyright (c) Wasted Audio 2023 - GPL-3.0-or-later"
# cp override/* WSTD_EQ/plugin/source/
# make -C WSTD_EQ WITH_LTO=true -j $(nproc)

- name: Build macOS universal plugins
env:
CFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -mmacosx-version-min=10.12 -mtune=generic -msse -msse2
CXXFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -mmacosx-version-min=10.12 -mtune=generic -msse -msse2
LDFLAGS: -arch x86_64 -arch arm64 -mmacosx-version-min=10.12
run: |
hvcc wstd_eq.pd -n WSTD_EQ -m wstd_eq.json -o WSTD_EQ -g dpf -p dep/heavylib/ dep/ --copyright "Copyright (c) Wasted Audio 2023 - GPL-3.0-or-later"
cp override/* WSTD_EQ/plugin/source/
make -C WSTD_EQ NOOPT=true WITH_LTO=true -j $(sysctl -n hw.logicalcpu)
cd WSTD_EQ
../dep/dpf/utils/package-osx-bundles.sh
# - name: Set sha8 (non-release)
# if: startsWith(github.ref, 'refs/tags/') != true
# id: slug1
# run: echo "action_tag=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
# - name: Set tag (release)
# if: startsWith(github.ref, 'refs/tags/')
# id: slug2
# run: echo "action_tag=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
# - name: Pack binaries
# run: |
# cd WSTD_EQ
# mv bin WSTD_EQ
# tar -c -h -z -f ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.action_tag }}.tar.gz WSTD_EQ/
# - uses: actions/upload-artifact@v3
# with:
# name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.action_tag }}
# path: |
# WSTD_EQ/*.tar.gz
# - uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# tag_name: ${{ github.ref_name }}
# name: ${{ github.ref_name }}
# draft: false
# prerelease: false
# files: |
# WSTD_EQ/*.tar.gz

- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
id: slug1
run: echo "action_tag=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set tag (release)
if: startsWith(github.ref, 'refs/tags/')
id: slug2
run: echo "action_tag=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
# macos-universal:
# runs-on: macos-11
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: 3.9
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# python -m pip install git+https://github.com/Wasted-Audio/hvcc.git@${{ env.HVCC_VERSION }}

- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || env.action_tag }}
path: |
WSTD_EQ/*-macOS.pkg
# - name: Build macOS universal plugins
# env:
# CFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -mmacosx-version-min=10.12 -mtune=generic -msse -msse2
# CXXFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -mmacosx-version-min=10.12 -mtune=generic -msse -msse2
# LDFLAGS: -arch x86_64 -arch arm64 -mmacosx-version-min=10.12
# run: |
# hvcc wstd_eq.pd -n WSTD_EQ -m wstd_eq.json -o WSTD_EQ -g dpf -p dep/heavylib/ dep/ --copyright "Copyright (c) Wasted Audio 2023 - GPL-3.0-or-later"
# cp override/* WSTD_EQ/plugin/source/
# make -C WSTD_EQ NOOPT=true WITH_LTO=true -j $(sysctl -n hw.logicalcpu)
# cd WSTD_EQ
# ../dep/dpf/utils/package-osx-bundles.sh

- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
WSTD_EQ/*-macOS.pkg
# - name: Set sha8 (non-release)
# if: startsWith(github.ref, 'refs/tags/') != true
# id: slug1
# run: echo "action_tag=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
# - name: Set tag (release)
# if: startsWith(github.ref, 'refs/tags/')
# id: slug2
# run: echo "action_tag=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV

# - uses: actions/upload-artifact@v3
# with:
# name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || env.action_tag }}
# path: |
# WSTD_EQ/*-macOS.pkg

# - uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# tag_name: ${{ github.ref_name }}
# name: ${{ github.ref_name }}
# draft: false
# prerelease: false
# files: |
# WSTD_EQ/*-macOS.pkg

0 comments on commit 33dd71c

Please sign in to comment.