test TSimbaFile.FileReadBytes for byte reading when hasing files #10
Workflow file for this run
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: | |
| - '**' | |
| jobs: | |
| build: | |
| name: ${{ matrix.config.name }} | |
| runs-on: ${{ matrix.config.runs-on }} | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| # note: names must equal Simba build modes | |
| - name: Win64 | |
| runs-on: windows-latest | |
| binary: Simba-Win64.exe | |
| test: Simba-Win64.exe | |
| - name: Win64 DebugInfo | |
| runs-on: windows-latest | |
| binary: Simba-Win64-Debug.exe | |
| test: Simba-Win64-Debug.exe | |
| - name: Win32 | |
| runs-on: windows-latest | |
| binary: Simba-Win32.exe | |
| test: Simba-Win32.exe | |
| - name: Linux | |
| runs-on: ubuntu-22.04 | |
| binary: Simba-Linux64 | |
| test: Simba-Linux64 | |
| - name: Linux Arm | |
| runs-on: ubuntu-22.04-arm | |
| binary: Simba-Linux | |
| #test: Simba-Linux MatchTemplateMask test fails, investigate later | |
| - name: Mac | |
| runs-on: macos-13 | |
| binary: Simba-Mac.dmg | |
| - name: Mac Arm | |
| runs-on: macos-14 | |
| binary: Simba-Mac-Arm.dmg | |
| #test: Simba MatchTemplateMask test fails, investigate later | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| submodules: true | |
| - name: Install Lazarus (Mac) | |
| if: matrix.config.name == 'Mac' | |
| uses: ollydev/[email protected] | |
| with: | |
| laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%204.0/lazarus-darwin-x86_64-4.0.zip | |
| fpc-url: | | |
| https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%204.0/fpc-3.2.2.intelarm64-macosx.dmg | |
| - name: Install Lazarus (Mac Arm) | |
| if: matrix.config.name == 'Mac Arm' | |
| uses: ollydev/[email protected] | |
| with: | |
| laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%204.0/lazarus-darwin-aarch64-4.0.zip | |
| fpc-url: | | |
| https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%204.0/fpc-3.2.2.intelarm64-macosx.dmg | |
| - name: Install Lazarus (Linux) | |
| if: matrix.config.name == 'Linux' | |
| uses: ollydev/[email protected] | |
| with: | |
| laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%204.0/lazarus-project_4.0.0-0_amd64.deb | |
| fpc-url: | | |
| https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%204.0/fpc-laz_3.2.2-210709_amd64.deb | |
| https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%204.0/fpc-src_3.2.2-210709_amd64.deb | |
| - name: Install Lazarus (Linux Arm) | |
| if: matrix.config.name == 'Linux Arm' | |
| uses: ollydev/[email protected] | |
| with: | |
| laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20arm64%20DEB/Lazarus%204.0/lazarus-project_4.0.0-0_arm64.deb | |
| fpc-url: | | |
| https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20arm64%20DEB/Lazarus%204.0/fpc-laz_3.2.3-240813_arm64.deb | |
| https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20arm64%20DEB/Lazarus%204.0/fpc-src_3.2.3-240813_arm64.deb | |
| - name: Install Lazarus (Win32) | |
| if: startsWith(matrix.config.name, 'Win32') == true | |
| uses: ollydev/[email protected] | |
| with: | |
| laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%204.0/lazarus-4.0-fpc-3.2.2-win32.exe | |
| - name: Install Lazarus (Win64) | |
| if: startsWith(matrix.config.name, 'Win64') == true | |
| uses: ollydev/[email protected] | |
| with: | |
| laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%204.0/lazarus-4.0-fpc-3.2.2-win64.exe | |
| - name: Build Simba | |
| run: | | |
| export GITHUB_SHORT_SHA=$(git rev-parse --short HEAD) | |
| lazbuild --build-mode="${{ matrix.config.name }}" "Source/Simba.lpi" | |
| - name: Create Mac Image | |
| if: startsWith(matrix.config.name, 'Mac') == true | |
| run: | | |
| 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" "${{ matrix.config.binary }}" "Simba.app" && break || sleep 15; | |
| done | |
| - name: Test Simba | |
| if: matrix.config.test != '' | |
| run: | | |
| if [[ "${{ matrix.config.runs-on }}" == ubuntu* ]]; then | |
| export DISPLAY=:1 | |
| Xvfb :1 & sleep 2 | |
| fi | |
| chmod +x ${{ matrix.config.test }} | |
| ./${{ matrix.config.test }} --run "Tests/RunTests/tester.simba" | |
| - name: Upload Simba Binary | |
| uses: actions/[email protected] | |
| with: | |
| name: ${{ matrix.config.name }} | |
| path: ${{ matrix.config.binary }} |