Skip to content

add PDBs to wxlib.bat build (-install neglects them) #44

add PDBs to wxlib.bat build (-install neglects them)

add PDBs to wxlib.bat build (-install neglects them) #44

name: NSFPlay 3 Builds
on:
push:
branches: [ "nsfplay3" ]
pull_request:
branches: [ "nsfplay3" ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-tests:
name: Code Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Files
uses: actions/checkout@v4
- name: Verify Generated Enums
run: make enums_verify
- name: Build Mutexed Core
run: make core_mutex
- name: Build No Text Core
run: make core_notext
- name: Build Minimal Core
run: make core_minimal
- name: Build No-Sound Cmd
run: make cmd_nosound
build-msvc:
name: Windows MSVC
runs-on: windows-2019
steps:
- name: Checkout Files
uses: actions/checkout@v4
- name: Setup MSVC
uses: microsoft/setup-msbuild@v2
- name: Submodule Cache Keys
shell: pwsh
run: |
echo "WXHASH=$($(git submodule status wx) -replace '\s','')" >> $env:GITHUB_ENV
echo "PAHASH=$($(git submodule status portaudio) -replace '\s','')" >> $env:GITHUB_ENV
- name: Cache Submodules
id: cache-sub
uses: actions/cache@v4
with:
path: |
wxlib/lib
wxlib/include
portaudiolib/vc64
portaudiolib/vc32
key: sub-msvc-${{ env.WXHASH }}-${{ env.PAHASH }}
- name: Build Submodules
if: steps.cache-sub.outputs.cache-hit != 'true'
shell: cmd
run: |
echo on
git submodule init
git submodule update --depth 1
cd wx
git submodule init
git submodule update --depth 1
cd ..
set WXB_NODEBUG=1
set WXB_NOPAUSE=1
call wxlib.bat
set PAB_NODEBUG=1
set PAB_NOPAUSE=1
call portaudiolib.bat
- name: Build 64-bit
run: msbuild nsfplay.sln -t:rebuild -property:Configuration=Release -property:Platform=x64
- name: Build 32-bit
run: msbuild nsfplay.sln -t:rebuild -property:Configuration=Release -property:Platform=x86
- name: Prepare Artifacts
shell: pwsh
run: |
mkdir artifact64
cp nsfplay.txt artifact64
cp output/x64/Release/nsfplay.exe artifact64
cp output/x64/Release/nsfplac.exe artifact64
cp output/Win32/Release/nsfplay.dll artifact64
mkdir artifact32
cp nsfplay.txt artifact32
cp output/Win32/Release/nsfplay.exe artifact32
cp output/Win32/Release/nsfplac.exe artifact32
cp output/Win32/Release/nsfplay.dll artifact32
echo "BUILD_TAG=$(git log -1 --format="%ad--%h" --date=format-local:"%Y-%m-%d-%H%M%S")" >> $env:GITHUB_ENV
- name: Upload 64-bit Artifact
uses: actions/upload-artifact@v4
with:
name: nsfplay3-win64--${{ env.BUILD_TAG }}
path: artifact64/
- name: Upload 32-bit Artifact
uses: actions/upload-artifact@v4
with:
name: nsfplay3-win32--${{ env.BUILD_TAG }}
path: artifact32/
build-msys2:
name: Windows MSYS2
runs-on: windows-latest
steps:
- name: Checkout Files
uses: actions/checkout@v4
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: git make mingw-w64-ucrt-x86_64-gcc mingw-w64-i686-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-i686-cmake
- name: Submodule Cache Keys
shell: pwsh
run: |
echo "WXHASH=$($(git submodule status wx) -replace '\s','')" >> $env:GITHUB_ENV
echo "PAHASH=$($(git submodule status portaudio) -replace '\s','')" >> $env:GITHUB_ENV
- name: Cache Submodules
id: cache-sub
uses: actions/cache@v4
with:
path: |
wxlib/lib
wxlib/include
portaudiolib/make64
portaudiolib/make32
key: sub-msys2-${{ env.WXHASH }}-${{ env.PAHASH }}
- name: Build Submodules
if: steps.cache-sub.outputs.cache-hit != 'true'
shell: msys2 {0}
run: |
export WXL_CMAKEDIR=make64
export PAOUT=portaudiolib/make64
export PACMAKE=../make64_cmake
make wxlib
make portaudiolib
export PATH="/mingw32/bin:$PATH"
export WXL_CMAKEDIR=make32
export PAOUT=portaudiolib/make32
export PACMAKE=../make32_cmake
make wxlib
make portaudiolib
- name: Make 64-bit
shell: msys2 {0}
run: |
export PAL_DIR=../portaudiolib/make64
export OUTDIR=output/make64 INTDIR=intermediate/make64
make cmd nsfplay
- name: Make 32-bit
shell: msys2 {0}
run: |
export PATH="/mingw32/bin:$PATH"
export WXL_LIBDIR=gcc_lib
export PAL_DIR=../portaudiolib/make32
export OUTDIR=output/make32 INTDIR=intermediate/make32
make cmd nsfplay winamp
- name: Prepare Artifacts
shell: pwsh
run: |
mkdir artifact64
cp nsfplay.txt artifact64
cp output/make64/nsfplay.exe artifact64
cp output/make64/nsfplac.exe artifact64
cp output/make32/nsfplay.dll artifact64
mkdir artifact32
cp nsfplay.txt artifact32
cp output/make32/nsfplay.exe artifact32
cp output/make32/nsfplac.exe artifact32
cp output/make32/nsfplay.dll artifact32
echo "BUILD_TAG=$(git log -1 --format="%ad--%h" --date=format-local:"%Y-%m-%d-%H%M%S")" >> $env:GITHUB_ENV
- name: Upload 64-bit Artifact
uses: actions/upload-artifact@v4
with:
name: nsfplay3-win64-ucrt--${{ env.BUILD_TAG }}
path: artifact64/
- name: Upload 32-bit Artifact
uses: actions/upload-artifact@v4
with:
name: nsfplay3-win32-mingw--${{ env.BUILD_TAG }}
path: artifact32/
build-ubuntu:
name: Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout Files
uses: actions/checkout@v4
- name: Setup Ubuntu
run: |
sudo apt-get update
sudo apt-get install git make gcc cmake libgtk-3-dev libjack-dev libasound2-dev
- name: Submoudle Cache Keys
run: |
echo "WXHASH=$(git submodule status wx | tr -d '[:blank:]')" >> $GITHUB_ENV
echo "PAHASH=$(git submodule status portaudio | tr -d '[:blank:]')" >> $GITHUB_ENV
- name: Cache Submodules
id: cache-sub
uses: actions/cache@v4
with:
path: |
wxlib/make
wx/include
portaudiolib/make
key: sub-ubuntu-${{ env.WXHASH }}-${{ env.PAHASH }}
# Cache needs the source include because wx-config does not reference the cmake --install
# directories, only the source build for some reason?
- name: Build Submodules
if: steps.cache-sub.outputs.cache-hit != 'true'
run: |
make wxlib
make portaudiolib
rm -rf wxlib/make/libs
# Remove libs folder to keep cache smaller. It's just temporary build data.
- name: Make
run: make cmd nsfplay
- name: Prepare Artifacts
run: |
mkdir artifact
cp nsfplay.txt artifact
cp output/make/nsfplay artifact
cp output/make/nsfplac artifact
echo "BUILD_TAG=$(git log -1 --format="%ad--%h" --date=format-local:"%Y-%m-%d-%H%M%S")" >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: nsfplay3-ubuntu--${{ env.BUILD_TAG }}
path: artifact/
build-macos:
name: MacOS
runs-on: macos-latest
steps:
- name: Checkout Files
uses: actions/checkout@v4
- name: Setup MacOS
run: brew install imagemagick
- name: Submodule Cache Keys
run: |
echo "WXHASH=$(git submodule status wx | tr -d '[:blank:]')" >> $GITHUB_ENV
echo "PAHASH=$(git submodule status portaudio | tr -d '[:blank:]')" >> $GITHUB_ENV
- name: Cache Submodules
id: cache-sub
uses: actions/cache@v4
with:
path: |
wxlibArm/make
wxlibIntel/make
wx/include
portaudiolib/makeArm
portaudiolib/makeIntel
key: sub-macos-${{ env.WXHASH }}-${{ env.PAHASH }}
- name: Build Submodules
if: steps.cache-sub.outputs.cache-hit != 'true'
run: |
export CC=clang
export WXOUT=wxlibArm
export WXCONF_EXTRA="-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES=arm64"
export PAOUT=portaudiolib/makeArm
export PACMAKE=../makeArm_cmake
export PACONF_EXTRA="-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES=arm64"
make wxlib
make portaudiolib
export WXOUT=wxlibIntel
export WXCONF_EXTRA="-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DCMAKE_OSX_ARCHITECTURES=x86_64"
export PAOUT=portaudiolib/makeIntel
export PACMAKE=../makeIntel_cmake
export PACONF_EXTRA="-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DCMAKE_OSX_ARCHITECTURES=x86_64"
make wxlib
make portaudiolib
rm -rf wxlibArm/make/libs
rm -rf wxlibIntel/make/libs
# Remove libs folder to keep cache smaller. It's just temporary build data.
- name: Make
run: |
export CC=clang
export CXXFLAGS_EXTRA="-target arm64-apple-macos11 -std=c++11"
export LDFLAGS_EXTRA="-target arm64-apple-macos11"
export WXL_DIR=../wxlibArm
export PAL_DIR=../portaudiolib/makeArm
export OUTDIR=output/makeArm INTDIR=intermediate/makeArm
make cmd nsfplay
export CXXFLAGS_EXTRA="-target x86_64-apple-macos10.13 -std=c++11"
export LDFLAGS_EXTRA="-target x86_64-apple-macos10.13"
export WXL_DIR=../wxlibIntel
export PAL_DIR=../portaudiolib/makeIntel
export OUTDIR=output/makeIntel INTDIR=intermediate/makeIntel
make cmd nsfplay
- name: Make Fat App
run: |
lipo -create -output output/makeArm/nsfplac2 output/makeArm/nsfplac output/makeIntel/nsfplay
lipo -create -output output/makeArm/nsfplay2 output/makeArm/nsfplay output/makeIntel/nsfplay
mv output/makeArm/nsfplac2 output/makeArm/nsfplac
mv output/makeArm/nsfplay2 output/makeArm/nsfplay
export WXL_DIR=../wxlibArm
export OUTDIR=output/makeArm INTDIR=intermediate/makeArm
make mac
- name: Prepare Signature
if: github.event_name != 'pull_request'
env:
CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
run: echo $CERTIFICATE | base64 --decode -o certificate.p12
- name: Sign Command Line Tool
if: github.event_name != 'pull_request'
uses: indygreg/apple-code-sign-action@v1.0
with:
input_path: output/makeArm/nsfplac
p12_file: certificate.p12
p12_password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
- name: Sign Application Bundle
if: github.event_name != 'pull_request'
uses: indygreg/apple-code-sign-action@v1.0
with:
input_path: output/makeArm/nsfplay.app
p12_file: certificate.p12
p12_password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
- name: Prepare Artifacts
run: |
mkdir artifact
cp nsfplay.txt artifact
cp output/makeArm/nsfplac artifact
cp -r output/makeArm/nsfplay.app artifact/nsfplay.app
echo "BUILD_TAG=$(git log -1 --format="%ad--%h" --date=format-local:"%Y-%m-%d-%H%M%S")" >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: nsfplay3-macos--${{ env.BUILD_TAG }}
path: artifact/