last fix for tonight #1794
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
| on: [push] | |
| env: | |
| ProjectName: Chataigne | |
| PackagesVersion: 1.2.10 | |
| jobs: | |
| windows: | |
| name: Windows | |
| # if: false # always skip job | |
| runs-on: windows-2022 | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: win-x64 | |
| buildFolder: "VisualStudio2022_CI" | |
| installerName: install | |
| - arch: win7-x64 | |
| buildFolder: "VisualStudio2022_Win7CI" | |
| installerName: installWin7 | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: 'recursive' | |
| - name: Checkout JUCE | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: benkuper/JUCE | |
| ref: develop-local | |
| path: JUCE | |
| - name: Set Variables | |
| id: set_variables | |
| uses: ./.github/actions/set-suffix | |
| with: | |
| os: ${{ matrix.arch }} | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v1.0.2 | |
| - name: Force 64-bit Linker | |
| shell: powershell | |
| run: | | |
| cmd.exe /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt" | |
| Get-Content "$env:temp\vcvars.txt" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] }} | |
| - name: Build | |
| run: msbuild "Builds/${{ matrix.buildFolder }}/${{ env.ProjectName }}.sln" /p:PreferredToolArchitecture=x64 /m /verbosity:normal /p:Configuration=${{ steps.set_variables.outputs.config }} | |
| - name: Create Package | |
| id: create_package | |
| shell: powershell | |
| run: | | |
| Set-Variable -Name "PKGNAME" -Value "${{ env.ProjectName }}-${{ steps.set_variables.outputs.suffix }}" | |
| Invoke-WebRequest "${{ secrets.DEPDIRURL }}${{ env.ProjectName }}-win-x64-${{ steps.set_variables.outputs.dep }}-dependencies.zip" -OutFile ./deps.zip | |
| 7z e deps.zip -aoa | |
| &"C:/Program Files (x86)/Inno Setup 6/ISCC.exe" "${{ github.workspace }}/${{ matrix.installerName }}.iss" /O. /F$PKGNAME | |
| echo "pkg-name=$PKGNAME.exe" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | |
| echo "pdb-name=$PKGNAME.pdb" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | |
| working-directory: ./Binaries/CI/App | |
| - name: Upload | |
| uses: ./.github/actions/upload | |
| with: | |
| pkg-name: ./Binaries/CI/App/${{ steps.create_package.outputs.pkg-name }} | |
| url: ${{ secrets.UPLOADURL }} | |
| pass: ${{ secrets.UPLOADPASS }} | |
| - name: Rename PDB | |
| if: ${{ steps.set_variables.outputs.config == 'Release' && matrix.arch == 'win-x64' }} | |
| id: rename_pdb | |
| shell: powershell | |
| run: | | |
| Rename-Item -Path "./${{ env.ProjectName }}.pdb" -NewName "${{ steps.create_package.outputs.pdb-name }}" | |
| working-directory: ./Builds/${{ matrix.buildFolder }}/x64/${{ steps.set_variables.outputs.config }}/App | |
| - name: Upload PDB | |
| if: ${{ steps.set_variables.outputs.config == 'Release' && matrix.arch == 'win-x64' }} | |
| uses: ./.github/actions/upload | |
| with: | |
| pkg-name: ./Builds/${{ matrix.buildFolder }}/x64/${{ steps.set_variables.outputs.config }}/App/${{ steps.create_package.outputs.pdb-name }} | |
| url: ${{ secrets.PDBUPLOADURL }} | |
| pass: ${{ secrets.UPLOADPASS }} | |
| osx: | |
| # if: false # tmp disable | |
| name: OSX | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: x86_64 | |
| suffix: intel | |
| config: Release | |
| - arch: arm64 | |
| suffix: silicon | |
| config: ReleaseSilicon | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: 'recursive' | |
| - name: Checkout JUCE | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: benkuper/JUCE | |
| ref: develop-local | |
| path: JUCE | |
| - name: Set Suffix | |
| id: set_variables | |
| uses: ./.github/actions/set-suffix | |
| with: | |
| os: 'osx-${{ matrix.suffix }}' | |
| - name: Download Packages | |
| run: | | |
| curl -L -o Packages.dmg 'http://s.sudre.free.fr/Software/files/Packages.dmg' | |
| hdiutil mount Packages.dmg | |
| sudo installer -pkg "/Volumes/Packages ${{ env.PackagesVersion }}/Install Packages.pkg" -target / | |
| hdiutil detach "/Volumes/Packages ${{ env.PackagesVersion }}/" | |
| - name: Setup XCode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.4.0' | |
| - name: Build | |
| uses: sersoft-gmbh/xcodebuild-action@v2.0.1 | |
| with: | |
| project: Builds/MacOSX_CI/${{ env.ProjectName }}.xcodeproj | |
| destination: platform=macOS | |
| jobs: 2 | |
| action: build | |
| arch: ${{ matrix.arch }} | |
| configuration: ${{ matrix.config }} | |
| use-xcpretty: true | |
| - name: Create Package | |
| id: create_package | |
| run: | | |
| packagesbuild ${{ env.ProjectName }}.pkgproj | |
| PKGNAME=${{ env.ProjectName }}-${{ steps.set_variables.outputs.suffix }}.pkg | |
| mv ${{ env.ProjectName }}.pkg $PKGNAME | |
| echo "pkg-name=$PKGNAME" >> $GITHUB_OUTPUT | |
| working-directory: ./Package | |
| - name: Upload | |
| uses: ./.github/actions/upload | |
| with: | |
| pkg-name: ./Package/${{ steps.create_package.outputs.pkg-name }} | |
| url: ${{ secrets.UPLOADURL }} | |
| pass: ${{ secrets.UPLOADPASS }} | |
| linux: | |
| name: Linux (x64) | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Checkout JUCE | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: benkuper/JUCE | |
| ref: develop-local | |
| path: JUCE | |
| - name: Installing dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libasound2-dev libjack-jackd2-dev ladspa-sdk \ | |
| libfreetype6-dev libx11-dev libxcomposite-dev \ | |
| libxcursor-dev libxinerama-dev libxext-dev \ | |
| libxrandr-dev libxrender-dev libwebkit2gtk-4.0-dev \ | |
| libglu1-mesa-dev mesa-common-dev libcurl4-openssl-dev \ | |
| libssl-dev libmosquitto-dev libmosquittopp-dev libbluetooth-dev \ | |
| libusb-1.0-0-dev libhidapi-dev libsdl2-dev | |
| wget "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" | |
| chmod a+x appimagetool-x86_64.AppImage | |
| - name: Build | |
| run: | | |
| # Clean incompatible blobs to force system linking | |
| rm -rf External/mosquitto/lib/linux/ | |
| rm -rf External/sdl/lib/linux/ | |
| cd Builds/LinuxMakefile | |
| make -j$(nproc) CONFIG=Release | |
| - name: Create AppImage (Bundled) | |
| id: create_package | |
| run: | | |
| APPDIR=${{ env.ProjectName }}.AppDir | |
| # Ensure structure exists | |
| mkdir -p $APPDIR/usr/bin | |
| mkdir -p $APPDIR/usr/lib | |
| # 1. Copy Executable | |
| cp Builds/LinuxMakefile/build/${{ env.ProjectName }} $APPDIR/usr/bin/ | |
| # 2. Bundle System Libraries (x64) | |
| LIB_PATH=/usr/lib/x86_64-linux-gnu | |
| echo "Bundling libs from $LIB_PATH..." | |
| # Copy dependencies (-d preserves symlinks like libssl.so -> libssl.so.3) | |
| cp -d $LIB_PATH/libmosquitto.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libmosquittopp.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libssl.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libcrypto.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libbluetooth.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libusb-1.0.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libhidapi-hidraw.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libSDL2-2.0.so* $APPDIR/usr/lib/ || true | |
| # 3. Create AppRun Script | |
| # This forces the app to look in local usr/lib before system paths | |
| if [ ! -f "$APPDIR/AppRun" ]; then | |
| echo '#!/bin/sh' > $APPDIR/AppRun | |
| echo 'HERE="$(dirname "$(readlink -f "${0}")")"' >> $APPDIR/AppRun | |
| echo 'export LD_LIBRARY_PATH="$HERE/usr/lib:$LD_LIBRARY_PATH"' >> $APPDIR/AppRun | |
| echo 'exec "$HERE/usr/bin/${{ env.ProjectName }}" "$@"' >> $APPDIR/AppRun | |
| chmod +x $APPDIR/AppRun | |
| fi | |
| # 4. Desktop File Check (Vital for AppImageTool) | |
| count=$(find $APPDIR -maxdepth 1 -name "*.desktop" | wc -l) | |
| if [ "$count" -eq "0" ]; then | |
| echo "::warning::No .desktop file found in $APPDIR root! Copying one if available..." | |
| # Try to copy from repo if it exists, e.g.: | |
| # cp Platform/Linux/${{ env.ProjectName }}.desktop $APPDIR/ || true | |
| fi | |
| # 5. Generate | |
| PKGNAME=${{ env.ProjectName }}-linux-x64.AppImage | |
| echo "pkg-name=$PKGNAME" >> $GITHUB_OUTPUT | |
| ./appimagetool-x86_64.AppImage --no-appstream $APPDIR $PKGNAME | |
| working-directory: ${{ github.workspace }} | |
| - name: Upload | |
| uses: ./.github/actions/upload | |
| with: | |
| pkg-name: ${{ steps.create_package.outputs.pkg-name }} | |
| url: ${{ secrets.UPLOADURL }} | |
| pass: ${{ secrets.UPLOADPASS }} | |
| raspberrypi: | |
| name: Raspberry Pi (Cross-Compile) | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: "RPi 64-bit" | |
| arch_name: aarch64 | |
| deb_arch: arm64 | |
| gnu_type: aarch64-linux-gnu | |
| buildFolder: "Raspberry64" | |
| buildConfig: "Release" | |
| arch_flags: "-march=armv8-a" | |
| - name: "RPi 32-bit" | |
| arch_name: armhf | |
| deb_arch: armhf | |
| gnu_type: arm-linux-gnueabihf | |
| buildFolder: "Raspberry" | |
| buildConfig: "Release" | |
| arch_flags: "-march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard" | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Checkout JUCE | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: benkuper/JUCE | |
| ref: develop-local | |
| path: JUCE | |
| - name: Setup Multi-Arch Apt | |
| run: | | |
| sudo dpkg --add-architecture ${{ matrix.deb_arch }} | |
| sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak | |
| # Add standard repos | |
| echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu jammy main universe restricted multiverse" | sudo tee /etc/apt/sources.list | |
| echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu jammy-updates main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list | |
| echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu jammy-security main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list | |
| # Add ports for ARM | |
| echo "deb [arch=${{ matrix.deb_arch }}] http://ports.ubuntu.com/ubuntu-ports jammy main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list | |
| echo "deb [arch=${{ matrix.deb_arch }}] http://ports.ubuntu.com/ubuntu-ports jammy-updates main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list | |
| echo "deb [arch=${{ matrix.deb_arch }}] http://ports.ubuntu.com/ubuntu-ports jammy-security main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list | |
| sudo apt-get update | |
| - name: Install Cross-Compiler and Libraries | |
| run: | | |
| sudo apt-get install -y crossbuild-essential-${{ matrix.deb_arch }} | |
| sudo apt-get install -y \ | |
| libasound2-dev:${{ matrix.deb_arch }} \ | |
| libjack-jackd2-dev:${{ matrix.deb_arch }} \ | |
| ladspa-sdk:${{ matrix.deb_arch }} \ | |
| libfreetype6-dev:${{ matrix.deb_arch }} \ | |
| libx11-dev:${{ matrix.deb_arch }} \ | |
| libxcomposite-dev:${{ matrix.deb_arch }} \ | |
| libxcursor-dev:${{ matrix.deb_arch }} \ | |
| libxinerama-dev:${{ matrix.deb_arch }} \ | |
| libxext-dev:${{ matrix.deb_arch }} \ | |
| libxrandr-dev:${{ matrix.deb_arch }} \ | |
| libxrender-dev:${{ matrix.deb_arch }} \ | |
| libwebkit2gtk-4.0-dev:${{ matrix.deb_arch }} \ | |
| libglu1-mesa-dev:${{ matrix.deb_arch }} \ | |
| mesa-common-dev:${{ matrix.deb_arch }} \ | |
| libcurl4-openssl-dev:${{ matrix.deb_arch }} \ | |
| libssl-dev:${{ matrix.deb_arch }} \ | |
| libmosquitto-dev:${{ matrix.deb_arch }} \ | |
| libmosquittopp-dev:${{ matrix.deb_arch }} \ | |
| libbluetooth-dev:${{ matrix.deb_arch }} \ | |
| libusb-1.0-0-dev:${{ matrix.deb_arch }} \ | |
| libhidapi-dev:${{ matrix.deb_arch }} \ | |
| libsdl2-dev:${{ matrix.deb_arch }} | |
| - name: Set Suffix | |
| id: set_variables | |
| uses: ./.github/actions/set-suffix | |
| with: | |
| os: ${{ matrix.arch_name }} | |
| - name: Build | |
| run: | | |
| # 1. Clean External blobs to force system linking | |
| rm -rf External/mosquitto/lib/linux/ | |
| rm -rf External/mosquitto/lib/rpi/ | |
| rm -rf External/sdl/lib/raspberry64/ | |
| rm -rf External/sdl/lib/raspberry/ | |
| rm -rf Modules/juce_simpleweb/libs/Linux/x86_64/ | |
| cd Builds/${{ matrix.buildFolder }} | |
| export PKG_CONFIG_PATH=/usr/lib/${{ matrix.gnu_type }}/pkgconfig | |
| make -j$(nproc) \ | |
| CONFIG=${{ matrix.buildConfig }} \ | |
| CC=${{ matrix.gnu_type }}-gcc \ | |
| CXX=${{ matrix.gnu_type }}-g++ \ | |
| AR=${{ matrix.gnu_type }}-ar \ | |
| STRIP=${{ matrix.gnu_type }}-strip \ | |
| TARGET_ARCH="${{ matrix.arch_flags }}" | |
| - name: Prepare AppImage Tool | |
| run: | | |
| wget "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" | |
| chmod a+x appimagetool-x86_64.AppImage | |
| - name: Create AppImage (Bundled) | |
| id: create_package | |
| run: | | |
| APPDIR=${{ env.ProjectName }}.AppDir | |
| mkdir -p $APPDIR/usr/bin | |
| mkdir -p $APPDIR/usr/lib | |
| # 1. Copy Executable | |
| cp Builds/${{ matrix.buildFolder }}/build/${{ env.ProjectName }} $APPDIR/usr/bin/ | |
| # 2. Bundle System Libraries (ARM) | |
| # We copy from the Cross-Arch system paths | |
| LIB_PATH=/usr/lib/${{ matrix.gnu_type }} | |
| echo "Bundling libs from $LIB_PATH..." | |
| cp -d $LIB_PATH/libmosquitto.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libmosquittopp.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libssl.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libcrypto.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libbluetooth.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libusb-1.0.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libhidapi-hidraw.so* $APPDIR/usr/lib/ || true | |
| cp -d $LIB_PATH/libSDL2-2.0.so* $APPDIR/usr/lib/ || true | |
| # 3. Create AppRun Script | |
| if [ ! -f "$APPDIR/AppRun" ]; then | |
| echo '#!/bin/sh' > $APPDIR/AppRun | |
| echo 'HERE="$(dirname "$(readlink -f "${0}")")"' >> $APPDIR/AppRun | |
| echo 'export LD_LIBRARY_PATH="$HERE/usr/lib:$LD_LIBRARY_PATH"' >> $APPDIR/AppRun | |
| echo 'exec "$HERE/usr/bin/${{ env.ProjectName }}" "$@"' >> $APPDIR/AppRun | |
| chmod +x $APPDIR/AppRun | |
| fi | |
| # 4. Desktop File Check | |
| count=$(find $APPDIR -maxdepth 1 -name "*.desktop" | wc -l) | |
| if [ "$count" -eq "0" ]; then | |
| echo "::error::No .desktop file found in $APPDIR! AppImageTool will fail." | |
| # cp Platform/Linux/${{ env.ProjectName }}.desktop $APPDIR/ || true | |
| exit 1 | |
| fi | |
| # 5. Generate | |
| PKGNAME=${{ env.ProjectName }}-linux-${{ steps.set_variables.outputs.suffix }}.AppImage | |
| echo "pkg-name=$PKGNAME" >> $GITHUB_OUTPUT | |
| export ARCH=${{ matrix.arch_name }} | |
| ./appimagetool-x86_64.AppImage --no-appstream $APPDIR $PKGNAME | |
| working-directory: ${{ github.workspace }} | |
| - name: Upload | |
| uses: ./.github/actions/upload | |
| with: | |
| pkg-name: ${{ steps.create_package.outputs.pkg-name }} | |
| url: ${{ secrets.UPLOADURL }} | |
| pass: ${{ secrets.UPLOADPASS }} |