Skip to content

macos build attempt #36

macos build attempt

macos build attempt #36

Workflow file for this run

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:
build-msvc:
name: Windows MSVC
if: false
runs-on: windows-2019
steps:
- name: Checkout Files
uses: actions/checkout@v4
- name: Setup MSVC
uses: microsoft/setup-msbuild@v2
- name: wxWidgets Cache Key
shell: pwsh
run: echo "WXHASH=$($(git submodule status wx) -replace '\s','')" >> $env:GITHUB_ENV
- name: Cache wxWidgets
id: cache-wx
uses: actions/cache@v4
with:
path: |
wxlib/lib
wxlib/include
key: wx-msvc-${{ env.WXHASH }}
- name: Build wxWidgets
if: steps.cache-wx.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
wxlib.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
if: false
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: wxWidgets Cache Key
shell: pwsh
run: echo "WXHASH=$($(git submodule status wx) -replace '\s','')" >> $env:GITHUB_ENV
- name: Cache wxWidgets
id: cache-wx
uses: actions/cache@v4
with:
path: |
wxlib/lib
wxlib/include
key: wx-msys2-${{ env.WXHASH }}
- name: Build wxWidgets
if: steps.cache-wx.outputs.cache-hit != 'true'
shell: msys2 {0}
run: |
export WXL_CMAKEDIR=make64
make wxlib
export PATH="/mingw32/bin:$PATH"
export WXL_CMAKEDIR=make32
make wxlib
- name: Make 64-bit
shell: msys2 {0}
run: |
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 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
if: false
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
- name: wxWidgets Cache Key
run: echo "WXHASH=$(git submodule status wx | tr -d '[:blank:]')" >> $GITHUB_ENV
- name: Cache wxWidgets
id: cache-wx
uses: actions/cache@v4
with:
path: |
wxlib/make
wx/include
key: wx-ubuntu-${{ env.WXHASH }}
# Cache needs the source include because wx-config does not reference the cmake --install
# directories, only the source build for some reason?
- name: Build wxWidgets
if: steps.cache-wx.outputs.cache-hit != 'true'
run: |
make wxlib
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: mac-latest
steps:

Check failure on line 193 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 193
- name: Checkout Files
uses: actions/checkout@v4
- name: Setup MacOS
run: brew install make cmake imagemagick
- name: Build wxWidgets
run: |
export CC=clang
export WXCONF_EXTRA="-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64"
make wxlib
- name: Make
run: |
export CC=clang
export CXXFLAGS_EXTRA="-target arm64-apple-macos11 -Wno-c++11-extension:
export LDFLAGS_EXTRA="-target arm64-apple-macos11"
export OUTDIR=output/makeArm INTDIR=intermediate/makeArm
make cmd nsfplay
export CXXFLAGS_EXTRA="-target x86_64-apple-macos10.13 -Wno-c++11-extension:
export LDFLAGS_EXTRA="-target x86_64-apple-macos10.13"
export OUTDIR=output/make64 INTDIR=intermediate/make64
make cmd nsfplay
- name: Prepare Artifacts
run: |
mkdir artifact
cp nsfplay.txt artifact
lipo -create -output artifact/nsfplayBoth output/makeArm/nsfplay output/make64/nsfplay
lipo -create -output artifact/nsfplacBoth output/makeArm/nsfplac output/make64/nsfplac
cp output/makeArm/nsfplay artifact/nsfplayArm
cp output/makeArm/nsfplac artifact/nsfplacArm
cp output/make64/nsfplay artifact/nsfplay64
cp output/make64/nsfplac artifact/nsfplac64
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/