test/cases/charset: fix size mismatch #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: OS X (powerpc/x86_64/arm64) | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| # The configure prefix for any given architecture is: | |
| # $HOME/{architecture}prefix | |
| # while any specific files/binaries needed for that architecture, not | |
| # necessarily related to autotools, should be stored in | |
| # $HOME/{architecture} | |
| # This is so that we don't screw up the global directories with | |
| # files for many different architectures. | |
| # WARNING: The PowerPC compiling code is probably the ugliest and hackiest | |
| # thing I have ever done with CI. To be honest I have no idea how it even | |
| # works properly and it mixes crap from different SDKs just to get it to | |
| # build with the only powerpc gcc that was built for x86_64 (gcc 4.2.1) | |
| # | |
| # For some time I attempted to build it with support for 10.3, but | |
| # evidently it's missing stuff that libgcc wants, and there's really | |
| # nothing that I can do about that. :( | |
| # | |
| # Maybe some day I'll write some stuff here that compiles and caches a | |
| # much newer compiler that is actually *meant* to target 10.3 so I can | |
| # get it working right. Or maybe I won't. :) | |
| jobs: | |
| osx: | |
| runs-on: macos-14 | |
| env: | |
| SDL_VERSION: 2.32.10 | |
| SDL_SHA256: 5f5993c530f084535c65a6879e9b26ad441169b3e25d789d83287040a9ca5165 | |
| FLAC_VERSION: 1.5.0 | |
| FLAC_SHA256: f2c1c76592a82ffff8413ba3c4a1299b6c7ab06c734dee03fd88630485c2b920 | |
| LIBOGG_VERSION: 1.3.6 | |
| LIBOGG_SHA256: 5c8253428e181840cd20d41f3ca16557a9cc04bad4a3d04cce84808677fa1061 | |
| UTF8PROC_VERSION: 2.10.0 | |
| UTF8PROC_SHA256: 276a37dc4d1dd24d7896826a579f4439d1e5fe33603add786bb083cab802e23e | |
| SDL12_VERSION: 1.2.15 | |
| SDL12_SHA256: 11fe2c54b13897ab3857218e56a445443ee1ce11a7d5482e5f9ef264d61bbbf1 | |
| steps: | |
| - name: 'Install dependencies' | |
| run: | | |
| # 7zip can extract DMG files without having to mount them | |
| brew install autoconf automake libtool zip sevenzip | |
| - name: 'Cache x86_64 dependencies' | |
| id: cache-x86_64-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: '/Users/runner/x86_64prefix' | |
| key: mac-x86_64-dependencies-SDL_${{ env.SDL_VERSION }}-FLAC_${{ env.FLAC_VERSION }}-LIBOGG_${{ env.LIBOGG_VERSION }}-UTF8PROC_${{ env.UTF8PROC_VERSION }}- | |
| - name: 'Cache x86_64 files' | |
| id: cache-x86_64-files | |
| uses: actions/cache@v4 | |
| with: | |
| path: '/Users/runner/x86_64' | |
| key: mac-x86_64-files | |
| - name: 'Cache arm64 dependencies' | |
| id: cache-arm64-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: '/Users/runner/arm64prefix' | |
| key: mac-arm64-dependencies-SDL_${{ env.SDL_VERSION }}-FLAC_${{ env.FLAC_VERSION }}-LIBOGG_${{ env.LIBOGG_VERSION }}-UTF8PROC_${{ env.UTF8PROC_VERSION }}- | |
| - name: 'Cache arm64 files' | |
| id: cache-arm64-files | |
| uses: actions/cache@v4 | |
| with: | |
| path: '/Users/runner/arm64' | |
| key: mac-arm64-files | |
| - name: 'Cache powerpc dependencies' | |
| id: cache-powerpc-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: '/Users/runner/ppcprefix' | |
| key: mac-powerpc-dependencies-SDL_${{ env.SDL12_VERSION }}-1-FLAC_${{ env.FLAC_VERSION }}-LIBOGG_${{ env.LIBOGG_VERSION }}-UTF8PROC_${{ env.UTF8PROC_VERSION }} | |
| - name: 'Cache powerpc files' | |
| id: cache-powerpc-files | |
| uses: actions/cache@v4 | |
| with: | |
| path: '/Users/runner/ppc' | |
| key: mac-powerpc-files | |
| - name: 'Download 10.7 & 10.11 SDK for x86_64' | |
| if: steps.cache-x86_64-files.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p "$HOME/x86_64" | |
| pushd "$HOME/x86_64" | |
| mkdir SDKs | |
| cd SDKs | |
| curl -L "https://github.com/alexey-lysiuk/macos-sdk/releases/download/10.7/MacOSX10.7.tar.bz2" | tar -xvf - | |
| curl -L "https://github.com/alexey-lysiuk/macos-sdk/releases/download/10.11/MacOSX10.11.tar.bz2" | tar -xvf - | |
| popd | |
| - name: 'Download 11.0 SDK for arm64' | |
| if: steps.cache-arm64-files.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p "$HOME/arm64" | |
| pushd "$HOME/arm64" | |
| mkdir SDKs | |
| cd SDKs | |
| curl -L "https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz" | tar -xvf - | |
| popd | |
| - name: 'Grab PowerPC cross compile binaries' | |
| if: steps.cache-powerpc-files.outputs.cache-hit != 'true' | |
| run: | | |
| wget -O schism-macppc-bins.zip "https://www.dropbox.com/scl/fi/trq99fq51p13nh8tajpwa/schism-macppc-bins.zip?rlkey=xemvhpmm1ci0dnseawmanr749&st=c7jlwru4&dl=1" | |
| unzip schism-macppc-bins.zip -d "schism-macppc-bins" | |
| rm schism-macppc-bins.zip | |
| pushd schism-macppc-bins | |
| mkdir -p "$HOME/ppc/SDKs" | |
| tar -xvf "Xcode3as.tar.gz" -C "$HOME/ppc" & | |
| tar -xvf "Xcode3gcc40.tar.gz" -C "$HOME/ppc" & | |
| tar -xvf "Xcode3gcc42.tar.gz" -C "$HOME/ppc" & | |
| tar -xvf "Xcode3ld.tar.gz" -C "$HOME/ppc" & | |
| tar -xvf "OSX108INT.tar.gz" -C "$HOME/ppc" & | |
| wait | |
| curl -L "https://github.com/alexey-lysiuk/macos-sdk/releases/download/10.4u/MacOSX10.4u.tar.bz2" | tar -xvf - -C "$HOME/ppc/SDKs" | |
| curl -L "https://github.com/alexey-lysiuk/macos-sdk/releases/download/10.5/MacOSX10.5.tar.bz2" | tar -xvf - -C "$HOME/ppc/SDKs" | |
| popd | |
| - name: 'Install PowerPC cross compile binaries into Xcode' | |
| run: | | |
| mkdir "$(xcrun xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/libexec/as/ppc" | |
| cp "$HOME/ppc/usr/libexec/gcc/darwin/ppc/as" "$(xcrun xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/libexec/as/ppc/as" | |
| - name: 'Checkout' | |
| uses: actions/checkout@v4 | |
| - name: 'Get date of latest commit' | |
| id: date | |
| run: echo "date=$(git log -n 1 --date=short --format=format:%cd | sed 's/\(....\)-\(..\)-\(..\).*/\1\2\3/')" >> $GITHUB_OUTPUT | |
| - name: 'Download SDL 1.2 binary (powerpc)' | |
| if: steps.cache-powerpc-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| wget -O "SDL-$SDL12_VERSION.dmg" "https://www.libsdl.org/release/SDL-$SDL12_VERSION-OSX10.4.dmg" | |
| echo "$SDL12_SHA256 SDL-$SDL12_VERSION.dmg" | shasum -a 256 -c - | |
| 7z x "SDL-$SDL12_VERSION.dmg" -o"SDL-$SDL12_VERSION" | |
| - name: 'Download SDL2 sources (x86_64/arm64)' | |
| if: steps.cache-x86_64-dependencies.outputs.cache-hit != 'true' || steps.cache-arm64-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| wget -O "SDL2-$SDL_VERSION.tar.gz" https://www.libsdl.org/release/SDL2-$SDL_VERSION.tar.gz || wget -O "SDL2-$SDL_VERSION.tar.gz" https://github.com/libsdl-org/SDL/releases/download/release-$SDL_VERSION/SDL2-$SDL_VERSION.tar.gz | |
| echo "$SDL_SHA256 SDL2-$SDL_VERSION.tar.gz" | shasum -a 256 -c - | |
| tar xvf "SDL2-$SDL_VERSION.tar.gz" | |
| - name: 'Install SDL 1.2 (powerpc)' | |
| if: steps.cache-powerpc-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| export PATH="$PATH:$HOME/ppc/usr/bin" | |
| mkdir -p "$HOME/ppcprefix/include" | |
| mkdir -p "$HOME/ppcprefix/lib" | |
| mv "SDL-$SDL12_VERSION/SDL/SDL.framework/Versions/A/Headers" "$HOME/ppcprefix/include/SDL" | |
| mv "SDL-$SDL12_VERSION/SDL/SDL.framework/Versions/A/SDL" "$HOME/ppcprefix/lib/libSDL-1.2.0.dylib" | |
| ln -sf "libSDL-1.2.0.dylib" "$HOME/ppcprefix/lib/libSDL.dylib" | |
| rm -rf "SDL-$SDL12_VERSION" | |
| - name: 'Build SDL2 (x86_64)' | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: 10.7 | |
| if: steps.cache-x86_64-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| pushd SDL2-$SDL_VERSION | |
| mkdir build_x86_64 | |
| cd build_x86_64 | |
| ../configure CPPFLAGS="-arch x86_64 -isysroot $HOME/x86_64/SDKs/MacOSX10.7.sdk" CFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" LDFLAGS="-arch x86_64 -F$HOME/x86_64/SDKs/MacOSX10.7.sdk/System/Library/Frameworks -L/usr/lib -L/usr/lib/system -Wl,-syslibroot,$HOME/x86_64/SDKs/MacOSX10.7.sdk" --host=x86_64-apple-darwin13 --prefix="$HOME/x86_64prefix" | |
| make | |
| make install | |
| popd | |
| - name: 'Build SDL2 (arm64)' | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: 11.0 | |
| if: steps.cache-arm64-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| pushd SDL2-$SDL_VERSION | |
| mkdir build_arm64 | |
| cd build_arm64 | |
| ../configure CPPFLAGS="-arch arm64 -isysroot $HOME/arm64/SDKs/MacOSX11.0.sdk" CXXFLAGS="-arch arm64" CFLAGS="-arch arm64" LDFLAGS="-arch arm64" --host=aarch64-apple-darwin20 --prefix="$HOME/arm64prefix" | |
| make | |
| make install | |
| popd | |
| - name: 'Download and prepare libogg sources' | |
| if: steps.cache-powerpc-dependencies.outputs.cache-hit != 'true' || steps.cache-x86_64-dependencies.outputs.cache-hit != 'true' || steps.cache-arm64-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| wget -O libogg-$LIBOGG_VERSION.tar.xz "https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-$LIBOGG_VERSION.tar.xz" || wget -O libogg-$LIBOGG_VERSION.tar.xz "https://github.com/xiph/ogg/releases/download/v$LIBOGG_VERSION/libogg-$LIBOGG_VERSION.tar.xz" | |
| echo "$LIBOGG_SHA256 libogg-$LIBOGG_VERSION.tar.xz" | shasum -a 256 -c - | |
| tar xvf "libogg-$LIBOGG_VERSION.tar.xz" | |
| pushd "libogg-$LIBOGG_VERSION" | |
| # libogg's configure is too old | |
| autoreconf -I"$HOME/x86_64prefix/share/aclocal" -fi | |
| popd | |
| - name: 'Build libogg (powerpc)' | |
| if: steps.cache-powerpc-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| pushd libogg-$LIBOGG_VERSION | |
| export PATH="$PATH:$HOME/ppc/usr/bin" | |
| mkdir build_powerpc | |
| cd build_powerpc | |
| ../configure CC=powerpc-apple-darwin10-gcc-4.2.1 CPP=powerpc-apple-darwin10-cpp-4.2.1 OBJC=powerpc-apple-darwin10-gcc-4.2.1 CXX=powerpc-apple-darwin10-g++-4.2.1 CPPFLAGS="-I$HOME/ppc/SDKs/MacOSX10.4u.sdk/usr/include/gcc/darwin/3.3 -isysroot $HOME/ppc/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" LDFLAGS="-F$HOME/ppc/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -L$HOME/ppc/SDKs/MacOSX10.4u.sdk/usr/lib -L$HOME/ppc/SDKs/MacOSX10.4u.sdk/usr/lib/system -Wl,-syslibroot,$HOME/ppc/SDKs/MacOSX10.4u.sdk" --host=powerpc-apple-darwin10 --prefix="$HOME/ppcprefix" | |
| make | |
| make install | |
| popd | |
| - name: 'Build libogg (x86_64)' | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: 10.7 | |
| if: steps.cache-x86_64-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| pushd libogg-$LIBOGG_VERSION | |
| mkdir build_x86_64 | |
| cd build_x86_64 | |
| ../configure CPPFLAGS="-arch x86_64 -isysroot $HOME/x86_64/SDKs/MacOSX10.7.sdk" CFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" LDFLAGS="-arch x86_64 -F$HOME/x86_64/SDKs/MacOSX10.7.sdk/System/Library/Frameworks -L/usr/lib -L/usr/lib/system -Wl,-syslibroot,$HOME/x86_64/SDKs/MacOSX10.7.sdk" --host=x86_64-apple-darwin13 --prefix="$HOME/x86_64prefix" | |
| make | |
| make install | |
| popd | |
| - name: 'Build libogg (arm64)' | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: 11.0 | |
| if: steps.cache-arm64-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| pushd libogg-$LIBOGG_VERSION | |
| mkdir build_arm64 | |
| cd build_arm64 | |
| ../configure CPPFLAGS="-arch arm64 -isysroot $HOME/arm64/SDKs/MacOSX11.0.sdk" CFLAGS="-arch arm64" CXXFLAGS="-arch arm64" LDFLAGS="-arch arm64" --host=aarch64-apple-darwin20 --prefix="$HOME/arm64prefix" | |
| make | |
| make install | |
| popd | |
| - name: 'Download and prepare FLAC sources' | |
| if: steps.cache-powerpc-dependencies.outputs.cache-hit != 'true' || steps.cache-x86_64-dependencies.outputs.cache-hit != 'true' || steps.cache-arm64-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| wget -O flac-$FLAC_VERSION.tar.xz "https://ftp.osuosl.org/pub/xiph/releases/flac/flac-$FLAC_VERSION.tar.xz" || wget -O flac-$FLAC_VERSION.tar.xz "https://github.com/xiph/flac/releases/download/$FLAC_VERSION/flac-$FLAC_VERSION.tar.xz" | |
| echo "$FLAC_SHA256 flac-$FLAC_VERSION.tar.xz" | shasum -a 256 -c - | |
| tar xvf "flac-$FLAC_VERSION.tar.xz" | |
| pushd "flac-$FLAC_VERSION" | |
| autoreconf -I"$HOME/x86_64prefix/share/aclocal" -fi | |
| popd | |
| - name: 'Build FLAC (powerpc)' | |
| if: steps.cache-powerpc-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| pushd flac-$FLAC_VERSION | |
| export PATH="$PATH:$HOME/ppc/usr/bin" | |
| mkdir build_powerpc | |
| cd build_powerpc | |
| ../configure CC=powerpc-apple-darwin10-gcc-4.2.1 CPP=powerpc-apple-darwin10-cpp-4.2.1 OBJC=powerpc-apple-darwin10-gcc-4.2.1 CXX=powerpc-apple-darwin10-g++-4.2.1 CPPFLAGS="-I$HOME/ppc/SDKs/MacOSX10.4u.sdk/usr/include/gcc/darwin/3.3 -isysroot $HOME/ppc/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" LDFLAGS="-F$HOME/ppc/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -L$HOME/ppc/SDKs/MacOSX10.4u.sdk/usr/lib -L$HOME/ppc/SDKs/MacOSX10.4u.sdk/usr/lib/system -Wl,-syslibroot,$HOME/ppc/SDKs/MacOSX10.4u.sdk" --host=powerpc-apple-darwin10 --prefix="$HOME/ppcprefix" --disable-cpplibs --disable-programs --disable-examples | |
| make | |
| make install | |
| popd | |
| - name: 'Build FLAC (x86_64)' | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: 10.7 | |
| if: steps.cache-x86_64-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| pushd flac-$FLAC_VERSION | |
| mkdir build_x86_64 && cd build_x86_64 | |
| ../configure CPPFLAGS="-arch x86_64 -isysroot $HOME/x86_64/SDKs/MacOSX10.7.sdk" CFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" LDFLAGS="-arch x86_64 -F$HOME/x86_64/SDKs/MacOSX10.7.sdk/System/Library/Frameworks -L/usr/lib -L/usr/lib/system -Wl,-syslibroot,$HOME/x86_64/SDKs/MacOSX10.7.sdk" --host=x86_64-apple-darwin13 --prefix="$HOME/x86_64prefix" --disable-cpplibs --disable-programs --disable-examples | |
| make | |
| make install | |
| popd | |
| - name: 'Build FLAC (arm64)' | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: 11.0 | |
| if: steps.cache-arm64-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| pushd flac-$FLAC_VERSION | |
| mkdir build_arm64 | |
| cd build_arm64 | |
| ../configure CPPFLAGS="-arch arm64 -isysroot $HOME/arm64/SDKs/MacOSX11.0.sdk" CFLAGS="-arch arm64" CXXFLAGS="-arch arm64" LDFLAGS="-arch arm64" --host=aarch64-apple-darwin20 --prefix="$HOME/arm64prefix" --disable-cpplibs --disable-programs --disable-examples | |
| make | |
| make install | |
| popd | |
| - name: 'Download utf8proc' | |
| if: steps.cache-powerpc-dependencies.outputs.cache-hit != 'true' || steps.cache-x86_64-dependencies.outputs.cache-hit != 'true' || steps.cache-arm64-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| wget -O "utf8proc-$UTF8PROC_VERSION.tar.gz" "https://github.com/JuliaStrings/utf8proc/releases/download/v$UTF8PROC_VERSION/utf8proc-$UTF8PROC_VERSION.tar.gz" | |
| echo "$UTF8PROC_SHA256 utf8proc-$UTF8PROC_VERSION.tar.gz" | shasum -a 256 -c - | |
| tar xvf "utf8proc-$UTF8PROC_VERSION.tar.gz" | |
| - name: 'Build utf8proc (powerpc)' | |
| if: steps.cache-powerpc-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| pushd utf8proc-$UTF8PROC_VERSION | |
| patch -p1 < ../.github/patches/utf8proc/2-fix-prefix.patch | |
| export PATH="$PATH:$HOME/ppc/usr/bin" | |
| make CC=powerpc-apple-darwin10-gcc-4.2.1 CFLAGS="-I$HOME/ppc/SDKs/MacOSX10.4u.sdk/usr/include/gcc/darwin/3.3 -isysroot $HOME/ppc/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -O2" LDFLAGS="-F$HOME/ppc/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -L$HOME/ppc/SDKs/MacOSX10.4u.sdk/usr/lib -L$HOME/ppc/SDKs/MacOSX10.4u.sdk/usr/lib/system -Wl,-syslibroot,$HOME/ppc/SDKs/MacOSX10.4u.sdk" | |
| make install | |
| patch -p1 -R < ../.github/patches/utf8proc/2-fix-prefix.patch | |
| popd | |
| - name: 'Build utf8proc (x86_64)' | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: 10.7 | |
| if: steps.cache-x86_64-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| pushd utf8proc-$UTF8PROC_VERSION | |
| mkdir build_x86_64 | |
| cd build_x86_64 | |
| LDFLAGS="-F$HOME/x86_64/SDKs/MacOSX10.7.sdk/System/Library/Frameworks -L/usr/lib -L/usr/lib/system -Wl,-syslibroot,$HOME/x86_64/SDKs/MacOSX10.7.sdk" cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$HOME/x86_64prefix" -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET="10.7" -DCMAKE_OSX_SYSROOT="$HOME/x86_64/SDKs/MacOSX10.7.sdk" -DBUILD_SHARED_LIBS=1 | |
| make | |
| make install | |
| popd | |
| - name: 'Build utf8proc (arm64)' | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: 11.0 | |
| if: steps.cache-arm64-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| pushd utf8proc-$UTF8PROC_VERSION | |
| mkdir build_arm64 | |
| cd build_arm64 | |
| cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$HOME/arm64prefix" -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" -DCMAKE_OSX_SYSROOT="$HOME/arm64/SDKs/MacOSX11.0.sdk" -DBUILD_SHARED_LIBS=1 | |
| make | |
| make install | |
| popd | |
| - name: 'Build Schism' | |
| run: | | |
| autoreconf -I"$HOME/x86_64prefix/share/aclocal" -i | |
| (export PATH="$PATH:$HOME/ppc/usr/bin" && export PKG_CONFIG_PATH="$HOME/ppcprefix/lib/pkgconfig" && mkdir build_powerpc && cd build_powerpc && ../configure CC=powerpc-apple-darwin10-gcc-4.2.1 CPP=powerpc-apple-darwin10-cpp-4.2.1 OBJC=powerpc-apple-darwin10-gcc-4.2.1 CXX=powerpc-apple-darwin10-g++-4.2.1 CPPFLAGS="-I$HOME/ppc/SDKs/MacOSX10.4u.sdk/usr/include/gcc/darwin/3.3 -isysroot $HOME/ppc/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" CFLAGS="-mcpu=G3 -O2 -ftree-vectorize" LDFLAGS="-F$HOME/ppc/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -L/usr/lib -L/usr/lib/system -Wl,-syslibroot,$HOME/ppc/SDKs/MacOSX10.4u.sdk -static-libgcc $HOME/ppc/SDKs/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.2.1/libgcc.a" SDL12_CFLAGS="-I$HOME/ppcprefix/include/SDL" SDL12_LIBS="-L$HOME/ppcprefix/lib -lSDL" --host=powerpc-apple-darwin10 --prefix="$HOME/ppcprefix" --with-flac --with-sdl12 --enable-flac-linking --enable-sdl12-linking --without-sdl2 && make && strip -S schismtracker) & | |
| (export PATH="$PATH:$HOME/ppc/usr/bin" && export PKG_CONFIG_PATH="$HOME/ppcprefix/lib/pkgconfig" && mkdir build_ppc7400 && cd build_ppc7400 && ../configure CC=powerpc-apple-darwin10-gcc-4.2.1 CPP=powerpc-apple-darwin10-cpp-4.2.1 OBJC=powerpc-apple-darwin10-gcc-4.2.1 CXX=powerpc-apple-darwin10-g++-4.2.1 CPPFLAGS="-I$HOME/ppc/SDKs/MacOSX10.4u.sdk/usr/include/gcc/darwin/3.3 -isysroot $HOME/ppc/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" CFLAGS="-mcpu=G4 -O2 -ftree-vectorize" LDFLAGS="-F$HOME/ppc/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -L/usr/lib -L/usr/lib/system -Wl,-syslibroot,$HOME/ppc/SDKs/MacOSX10.4u.sdk -static-libgcc $HOME/ppc/SDKs/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.2.1/libgcc.a" SDL12_CFLAGS="-I$HOME/ppcprefix/include/SDL" SDL12_LIBS="-L$HOME/ppcprefix/lib -lSDL" --host=powerpc-apple-darwin10 --prefix="$HOME/ppcprefix" --with-flac --with-sdl12 --enable-flac-linking --enable-sdl12-linking --without-sdl2 && make && strip -S schismtracker) & | |
| (export MACOSX_DEPLOYMENT_TARGET="10.7" && export PKG_CONFIG_PATH="$HOME/x86_64prefix/lib/pkgconfig" && mkdir build_x86_64 && cd build_x86_64 && ../configure CPPFLAGS="-arch x86_64 -isysroot $HOME/x86_64/SDKs/MacOSX10.11.sdk" CFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" LDFLAGS="-arch x86_64 -F$HOME/x86_64/SDKs/MacOSX10.11.sdk/System/Library/Frameworks -L/usr/lib -L/usr/lib/system -Wl,-syslibroot,$HOME/x86_64/SDKs/MacOSX10.11.sdk" --host=x86_64-apple-darwin13 --prefix="$HOME/x86_64prefix" --with-sdl-prefix="$HOME/x86_64prefix" --with-flac --without-sdl12 --enable-flac-linking --enable-sdl2-linking && make && strip -S schismtracker) & | |
| (export MACOSX_DEPLOYMENT_TARGET="11.0" && export PKG_CONFIG_PATH="$HOME/arm64prefix/lib/pkgconfig" && mkdir build_arm64 && cd build_arm64 && ../configure CPPFLAGS="-arch arm64 -isysroot $HOME/arm64/SDKs/MacOSX11.0.sdk" OBJCFLAGS="-arch arm64" CFLAGS="-arch arm64" CXXFLAGS="-arch arm64" LDFLAGS="-arch arm64" --host=aarch64-apple-darwin20 --prefix="$HOME/arm64prefix" --with-sdl-prefix="$HOME/arm64prefix" --with-flac --without-sdl12 --enable-flac-linking --enable-sdl2-linking && make && strip -S schismtracker) & | |
| wait | |
| cat build_powerpc/config.log | |
| cd ../.. | |
| - name: 'Package Schism' | |
| env: | |
| SCHISM_VERSION: ${{ steps.date.outputs.date }} | |
| run: | | |
| for i in FLAC.14 ogg.0; do | |
| "$HOME/ppc/usr/bin/install_name_tool" -change "$HOME/ppcprefix/lib/lib${i}.dylib" @executable_path/../Resources/lib${i}.dylib build_powerpc/schismtracker | |
| "$HOME/ppc/usr/bin/install_name_tool" -change "$HOME/ppcprefix/lib/lib${i}.dylib" @executable_path/../Resources/lib${i}.dylib build_ppc7400/schismtracker | |
| install_name_tool -change "$HOME/x86_64prefix/lib/lib${i}.dylib" @executable_path/../Resources/lib${i}.dylib build_x86_64/schismtracker | |
| install_name_tool -change "$HOME/arm64prefix/lib/lib${i}.dylib" @executable_path/../Resources/lib${i}.dylib build_arm64/schismtracker | |
| done | |
| "$HOME/ppc/usr/bin/install_name_tool" -change "@rpath/SDL.framework/Versions/A/SDL" "@executable_path/../Resources/libSDL-1.2.0.dylib" build_powerpc/schismtracker | |
| "$HOME/ppc/usr/bin/install_name_tool" -change "@rpath/SDL.framework/Versions/A/SDL" "@executable_path/../Resources/libSDL-1.2.0.dylib" build_ppc7400/schismtracker | |
| install_name_tool -change "$HOME/x86_64prefix/lib/libSDL2-2.0.0.dylib" @executable_path/../Resources/libSDL2-2.0.0.dylib build_x86_64/schismtracker | |
| install_name_tool -change "$HOME/arm64prefix/lib/libSDL2-2.0.0.dylib" @executable_path/../Resources/libSDL2-2.0.0.dylib build_arm64/schismtracker | |
| "$HOME/ppc/usr/bin/install_name_tool" -change "$HOME/ppcprefix/lib/libutf8proc.3.dylib" @executable_path/../Resources/libutf8proc.3.dylib build_powerpc/schismtracker | |
| "$HOME/ppc/usr/bin/install_name_tool" -change "$HOME/ppcprefix/lib/libutf8proc.3.dylib" @executable_path/../Resources/libutf8proc.3.dylib build_ppc7400/schismtracker | |
| install_name_tool -change "@rpath/libutf8proc.3.dylib" @executable_path/../Resources/libutf8proc.3.dylib build_x86_64/schismtracker | |
| install_name_tool -change "@rpath/libutf8proc.3.dylib" @executable_path/../Resources/libutf8proc.3.dylib build_arm64/schismtracker | |
| "$HOME/ppc/usr/bin/install_name_tool" -change "$HOME/ppcprefix/lib/libogg.0.dylib" @executable_path/../Resources/libogg.0.dylib "$HOME/ppcprefix/lib/libFLAC.14.dylib" | |
| install_name_tool -change "$HOME/x86_64prefix/lib/libogg.0.dylib" @executable_path/../Resources/libogg.0.dylib "$HOME/x86_64prefix/lib/libFLAC.14.dylib" | |
| install_name_tool -change "$HOME/arm64prefix/lib/libogg.0.dylib" @executable_path/../Resources/libogg.0.dylib "$HOME/arm64prefix/lib/libFLAC.14.dylib" | |
| lipo -create -o schismtracker build_powerpc/schismtracker build_ppc7400/schismtracker build_x86_64/schismtracker build_arm64/schismtracker | |
| cd sys/macosx/Schism_Tracker.app/Contents/ | |
| sed -i .bak "s;<string>CFBundle.*Version.*</string>;<string>$SCHISM_VERSION</string>;" Info.plist | |
| rm Info.plist.bak | |
| mkdir MacOS | |
| cp ../../../../schismtracker MacOS | |
| for i in FLAC.14 ogg.0 utf8proc.3; do | |
| lipo -create -o "Resources/lib${i}.dylib" "$HOME/x86_64prefix/lib/lib${i}.dylib" "$HOME/ppcprefix/lib/lib${i}.dylib" "$HOME/arm64prefix/lib/lib${i}.dylib" | |
| done | |
| lipo -create -o "Resources/libSDL2-2.0.0.dylib" "$HOME/x86_64prefix/lib/libSDL2-2.0.0.dylib" "$HOME/arm64prefix/lib/libSDL2-2.0.0.dylib" | |
| cp "$HOME/ppcprefix/lib/libSDL-1.2.0.dylib" "Resources/libSDL-1.2.0.dylib" | |
| cd ../../../.. | |
| cp -r sys/macosx/Schism_Tracker.app Schism\ Tracker.app | |
| cp docs/configuration.md . | |
| wget https://raw.githubusercontent.com/xiph/flac/master/COPYING.Xiph | |
| zip -r schismtracker.zip configuration.md COPYING COPYING.Xiph README.md Schism\ Tracker.app | |
| - name: 'Upload artifact' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: schismtracker-${{ steps.date.outputs.date }}-macos | |
| path: schismtracker.zip | |
| # Run test suite; based off code written by manx for OpenMPT. | |
| # sidenote: we should probably (definitely) be using matrixes for the | |
| # code above as well. As is, it's really an unmaintainable mess. | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| threads: [ | |
| { flag: '--disable-threads', name: '' }, | |
| { flag: '--enable-threads', name: '-threaded' }, | |
| ] | |
| sys: [ | |
| { host: macos-26, compiler: '26.0' }, | |
| { host: macos-15, compiler: '26.0' }, | |
| { host: macos-15, compiler: '16.4' }, | |
| { host: macos-15, compiler: '16.3' }, | |
| { host: macos-15, compiler: '16.2' }, | |
| { host: macos-15, compiler: '16.1' }, | |
| { host: macos-15, compiler: '16.0' }, | |
| { host: macos-15-intel, compiler: '26.0' }, | |
| { host: macos-15-intel, compiler: '16.4' }, | |
| { host: macos-15-intel, compiler: '16.3' }, | |
| { host: macos-15-intel, compiler: '16.2' }, | |
| { host: macos-15-intel, compiler: '16.1' }, | |
| { host: macos-15-intel, compiler: '16.0' }, | |
| { host: macos-14, compiler: '15.4' }, | |
| { host: macos-14, compiler: '15.3' }, | |
| ] | |
| concurrency: | |
| group: ${{github.ref}}-${{github.workflow}}-${{matrix.sys.host}}-${{matrix.sys.compiler}}${{matrix.threads.name}} | |
| cancel-in-progress: true | |
| runs-on: ${{matrix.sys.host}} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: 'Install dependencies' | |
| run: brew install autoconf automake utf8proc sdl2 | |
| - name: 'Change current Xcode version' | |
| run: sudo xcode-select --switch /Applications/Xcode_${{matrix.sys.compiler}}.app | |
| - name: 'Build Schism' | |
| env: | |
| CONFIGURE_FLAGS: ${{ matrix.threads.flag }} | |
| run: | | |
| autoreconf -i | |
| mkdir build | |
| cd build | |
| ../configure --enable-tests $CONFIGURE_FLAGS | |
| make | |
| - name: 'Run test suite' | |
| run: | | |
| cd build | |
| # Need to add this to the dyld search path or else we fail to load | |
| export DYLD_FALLBACK_LIBRARY_PATH="$(brew --prefix zstd)/lib:$(brew --prefix sdl2)/lib" | |
| ./schismtrackertest |