Resizing, pillow style #1599
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: build | |
| on: | |
| push: | |
| branches: ['**'] | |
| pull_request: | |
| branches: ['**'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: ${{ matrix.config.name }} | |
| runs-on: ${{ matrix.config.runs-on }} | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - name: Win64 | |
| runs-on: windows-latest | |
| build-mode: Windows (64bit) | |
| fpclazup-url: https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/v2.4.0g/fpclazup-x86_64-win64.exe | |
| fpclazup-lazcommit: 98f9c7a7a102139e43b39050ebbb5c48d805f59f # 4.4 | |
| fpclazup-fpccommit: d3a5f442eeff766a60cd7177536a9db7cc54875c # 3.2.4 | |
| - name: Win64 (Debug) | |
| runs-on: windows-latest | |
| build-mode: Default | |
| output: "Simba_windows_x86_64_debug" | |
| fpclazup-url: https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/v2.4.0g/fpclazup-x86_64-win64.exe | |
| fpclazup-lazcommit: 98f9c7a7a102139e43b39050ebbb5c48d805f59f # 4.4 | |
| fpclazup-fpccommit: d3a5f442eeff766a60cd7177536a9db7cc54875c # 3.2.4 | |
| - name: Win32 | |
| runs-on: windows-latest | |
| build-mode: Windows (32bit) | |
| fpclazup-url: https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/v2.4.0g/fpclazup-x86_64-win64.exe | |
| fpclazup-lazcommit: 98f9c7a7a102139e43b39050ebbb5c48d805f59f # 4.4 | |
| fpclazup-fpccommit: d3a5f442eeff766a60cd7177536a9db7cc54875c # 3.2.4 | |
| - name: Linux64 | |
| runs-on: ubuntu-24.04 | |
| build-mode: Linux (64bit) | |
| fpclazup-url: https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/v2.4.0g/fpclazup-x86_64-linux | |
| fpclazup-lazcommit: 98f9c7a7a102139e43b39050ebbb5c48d805f59f # 4.4 | |
| fpclazup-fpccommit: d3a5f442eeff766a60cd7177536a9db7cc54875c # 3.2.4 | |
| - name: Linux arm64 | |
| runs-on: ubuntu-24.04-arm | |
| build-mode: Linux (aarch64) | |
| fpclazup-url: https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/v2.4.0g/fpclazup-aarch64-linux | |
| fpclazup-lazcommit: 98f9c7a7a102139e43b39050ebbb5c48d805f59f # 4.4 | |
| fpclazup-fpccommit: d3a5f442eeff766a60cd7177536a9db7cc54875c # 3.2.4 | |
| - name: Mac arm64 | |
| runs-on: macos-26 | |
| build-mode: macOS (aarch64) | |
| fpclazup-url: https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/v2.4.0g/fpclazup-aarch64-darwin | |
| fpclazup-lazcommit: 98f9c7a7a102139e43b39050ebbb5c48d805f59f # 4.4 | |
| fpclazup-fpccommit: aa8050f30ce7a23f8881de844c07c0f17033409e # trunk (~3.3) | |
| - name: Mac intel | |
| runs-on: macos-26-intel | |
| build-mode: macOS (64bit) | |
| fpclazup-url: https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/v2.4.0g/fpclazup-x86_64-darwin | |
| fpclazup-lazcommit: 98f9c7a7a102139e43b39050ebbb5c48d805f59f # 4.4 | |
| fpclazup-fpccommit: aa8050f30ce7a23f8881de844c07c0f17033409e # trunk (~3.3) | |
| steps: | |
| - uses: actions/checkout@v6.0.1 | |
| with: | |
| submodules: true | |
| - name: Setup | |
| run: | | |
| echo "OS=$RUNNER_OS" >> "$GITHUB_ENV" | |
| echo "BUILD_MODE=${{ matrix.config.build-mode }}" >> "$GITHUB_ENV" | |
| echo "OUTPUT=${{ matrix.config.output }}" >> "$GITHUB_ENV" | |
| - name: Install Custom Lazarus | |
| uses: ollydev/setup-lazarus@v4.2 | |
| with: | |
| fpclazup-url: ${{ matrix.config.fpclazup-url }} | |
| fpclazup-lazcommit: ${{ matrix.config.fpclazup-lazcommit }} | |
| fpclazup-fpccommit: ${{ matrix.config.fpclazup-fpccommit }} | |
| - name: Build Simba | |
| run: | | |
| export GITHUB_SHORT_SHA=$(git rev-parse --short HEAD) | |
| lazbuild --build-mode="$BUILD_MODE" "Source/Simba.lpi" | |
| EXE=$(find . -maxdepth 1 -type f -name 'Simba*'); EXE=${EXE#./} | |
| if [ -n "$OUTPUT" ]; then | |
| case "$EXE" in *.*) NEW="$OUTPUT.${EXE##*.}";; *) NEW="$OUTPUT";; esac | |
| mv "$EXE" "$NEW"; EXE="$NEW" | |
| fi | |
| echo "EXE=$EXE" >> "$GITHUB_ENV" | |
| - name: macOS debug symbols | |
| if: env.OS == 'macOS' && env.OUTPUT != '' | |
| run: dsymutil "$EXE" | |
| - name: Linux display | |
| if: env.OS == 'Linux' | |
| run: | | |
| command -v Xvfb >/dev/null || { sudo apt-get update && sudo apt-get install -y xvfb; } | |
| Xvfb :1 >/dev/null 2>&1 & | |
| sleep 3 | |
| echo "DISPLAY=:1" >> "$GITHUB_ENV" | |
| - name: Test Simba | |
| run: | | |
| chmod +x "$EXE" | |
| "./$EXE" --run "Tests/RunTests/tester.simba" | |
| - name: Create Mac Image | |
| if: env.OS == 'macOS' | |
| run: | | |
| rm -rf Simba.app | |
| cp -R Source/macosbundle/Simba.app . | |
| cp "$EXE" Simba.app/Contents/MacOS/Simba | |
| rm -f Simba.app/Contents/MacOS/.gitkeep | |
| brew install create-dmg | |
| for i in {1..10}; do | |
| create-dmg --window-size 500 330 --icon-size 48 --icon "Simba.app" 130 135 \ | |
| --app-drop-link 380 135 --background "Source/macosbundle/installer.tff" \ | |
| "$EXE.dmg" "Simba.app" && break || sleep 15 | |
| done | |
| - name: Upload Simba Binary | |
| uses: actions/upload-artifact@v6.0.0 | |
| with: | |
| name: ${{ env.EXE }} | |
| path: ${{ env.OS == 'macOS' && format('{0}.dmg', env.EXE) || env.EXE }} | |
| if-no-files-found: error |