1- name : build
1+ name : build
22
33on :
44 push :
@@ -18,117 +18,100 @@ jobs:
1818 strategy :
1919 fail-fast : false
2020 matrix :
21- config :
22- # note: names must equal Simba build modes
23- - name : Win64
24- runs-on : windows-latest
25- binary : Simba-Win64.exe
26- test : Simba-Win64.exe
27-
28- - name : Win64 DebugInfo
29- runs-on : windows-latest
30- binary : Simba-Win64-Debug.exe
31- test : Simba-Win64-Debug.exe
32-
33- - name : Win32
34- runs-on : windows-latest
35- binary : Simba-Win32.exe
36- test : Simba-Win32.exe
21+ config :
22+ # - runs-on: macos-15-intel
23+ # name: Mac
24+ # build-mode: Mac
25+ # laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%203.8/lazarus-darwin-x86_64-3.8.zip
26+ # fpc-url: |
27+ # https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%203.8/fpc-3.2.2.intelarm64-macosx.dmg
3728
38- - name : Linux
39- runs-on : ubuntu-22.04
40- binary : Simba-Linux64
41- test : Simba-Linux64
29+ # - runs-on: macos-15
30+ # name: Mac Arm
31+ # build-mode: Mac
32+ # laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%203.8/lazarus-darwin-aarch64-3.8.zip
33+ # fpc-url: |
34+ # https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%203.8/fpc-3.2.2.intelarm64-macosx.dmg
4235
43- - name : Linux Arm
44- runs-on : ubuntu-22.04-arm
45- binary : Simba-Linux
46- # test: Simba-Linux MatchTemplateMask test fails, investigate later
36+ # - name: Mac Custom
37+ # runs-on: macos-15-intel
38+ # build-mode: Mac
39+ # binary: Simba-Mac.dmg
40+ # url: https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/v2.4.0g/fpclazup-x86_64-darwin
4741
48- - name : Mac Arm
49- runs-on : macos-14
50- binary : Simba-Mac-Arm.dmg
51- # test: Simba MatchTemplateMask test fails, investigate later
42+ - name : Mac arm64
43+ runs-on : macos-15-intel
44+ build-mode : Mac Arm
45+ binary : Simba-Mac-Arm.dmg
46+ url : https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/v2.4.0g/fpclazup-x86_64-darwin
47+ # url: https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/v2.4.0g/fpclazup-aarch64-darwin
5248
53- # GitHub removing macos 13 causes this problem on newer runners:
54- # "non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs"
55- # Fixed in new FPC but that will never release... (sort of like this project xD)
56- # Just comment out since x86 macos is quickly not existent in the year of 2025.
57- # - name: Mac
58- # runs-on: macos-13
59- # binary: Simba-Mac.dmg
60-
6149 steps :
6250 - uses : actions/checkout@v6.0.1
6351 with :
6452 submodules : true
6553
66- - name : Install Lazarus (Mac Arm)
67- if : matrix.config.name == 'Mac Arm'
68- uses : ollydev/setup-lazarus@v3.6
69- with :
70- laz-url : https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%204.4/lazarus-darwin-aarch64-4.4.zip
71- fpc-url : |
72- https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%204.4/fpc-3.2.2.intelarm64-macosx.dmg
54+ # - name: Restore
55+ # id: restore-cache
56+ # uses: actions/cache/restore@v4
57+ # with:
58+ # path: ${{ runner.temp }}/fpclazup
59+ # key: ${{ matrix.config.name }}2
60+
61+ - name : Install Lazarus
62+ working-directory : ${{ runner.temp }}
63+ if : steps.restore-cache.outputs.cache-hit != 'true'
64+ run : |
65+ curl --retry 5 -L -o installer ${{ matrix.config.url }}
66+ chmod +x installer
67+ ./installer --only=docker --lazVersion="stable.gitlab" --fpcVersion="trunk.gitlab" --installdir=fpclazup --noconfirm --verbose
68+ ./installer --ostarget=darwin --cputarget=aarch64 --only="FPCCleanOnly,FPCBuildOnly" --autotools --installdir=fpclazup --noconfirm --verbose
7369
74- - name : Install Lazarus (Linux)
75- if : matrix.config.name == 'Linux'
76- uses : ollydev/setup-lazarus@v3.6
77- with :
78- laz-url : https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%204.4/lazarus-project_4.4.0-0_amd64.deb
79- fpc-url : |
80- https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%204.4/fpc-laz_3.2.2-210709_amd64.deb
81- https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%204.4/fpc-src_3.2.2-210709_amd64.deb
82-
83- - name : Install Lazarus (Linux Arm)
84- if : matrix.config.name == 'Linux Arm'
85- uses : ollydev/setup-lazarus@v3.6
86- with :
87- laz-url : https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20arm64%20DEB/Lazarus%204.4/lazarus-project_4.4.0-0_arm64.deb
88- fpc-url : |
89- https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20arm64%20DEB/Lazarus%204.4/fpc-laz_3.2.3-240813_arm64.deb
90- https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20arm64%20DEB/Lazarus%204.4/fpc-src_3.2.3-240813_arm64.deb
70+ #git clone https://gitlab.com/freepascal.org/fpc/source fpclazup/fpc
71+ # Use a known working trunk commit
72+ #git -C fpclazup/fpc checkout de30ac10d4f228c5d4915c49d48715063ea55787
73+ #./installer --lazOPT="-g -gl -gw -O1" --fpcOPT="-g -gl -gw -O1" --only=FPCBuildOnly,LazarusGetOnly,LazBuild,LazarusConfigOnly --lazVersion="stable.gitlab" --installdir=fpclazup --noconfirm --verbose
74+
75+ - name : Add custom to path
76+ run : |
77+ echo "${{ runner.temp }}/fpclazup/lazarus/" >> $GITHUB_PATH
9178
92- - name : Install Lazarus (Win32)
93- if : startsWith(matrix.config.name, 'Win32') == true
94- uses : ollydev/setup-lazarus@v3.6
95- with :
96- laz-url : https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%204.4/lazarus-4.4-fpc-3.2.2-win32.exe
79+ # - name: Save Lazarus
80+ # if: steps.restore-cache.outputs.cache-hit != 'true'
81+ # uses: actions/cache/save@v4
82+ # with:
83+ # path: ${{ runner.temp }}/fpclazup
84+ # key: ${{ matrix.config.name }}2
9785
98- - name : Install Lazarus (Win64)
99- if : startsWith(matrix.config.name, 'Win64') == true
100- uses : ollydev/setup-lazarus@v3.6
101- with :
102- laz -url : https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%204.4/lazarus-4.4- fpc-3.2.2-win64.exe
86+ # - name: Install Lazarus
87+ # uses: ollydev/setup-lazarus@v3.5
88+ # with:
89+ # laz-url: ${{ matrix.config.laz-url }}
90+ # fpc -url: ${{ matrix.config. fpc-url }}
10391
10492 - name : Build Simba
10593 run : |
94+ echo "${{ matrix.config.build-mode }}"
10695 export GITHUB_SHORT_SHA=$(git rev-parse --short HEAD)
107- lazbuild --build-mode="${{ matrix.config.name }}" "Source/Simba.lpi"
96+ lazbuild --build-mode="${{ matrix.config.build-mode }}" "Source/Simba.lpi"
10897
109- - name : Create Mac Image
110- if : startsWith(matrix.config.name, 'Mac') == true
111- run : |
112- brew install create-dmg
113-
114- for i in {1..10};
115- do
116- 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;
117- done
98+ # - name: Debug
99+ # if: always()
100+ # uses: actions/upload-artifact@v4
101+ # with:
102+ # name: debug
103+ # path: build/Mac Arm
118104
119- - name : Test Simba
120- if : matrix.config.test != ''
121- run : |
122- if [[ "${{ matrix.config.runs-on }}" == ubuntu* ]]; then
123- export DISPLAY=:1
124- Xvfb :1 & sleep 2
125- fi
126-
127- chmod +x ${{ matrix.config.test }}
128- ./${{ matrix.config.test }} --run "Tests/RunTests/tester.simba"
129-
130- - name : Upload Simba Binary
131- uses : actions/upload-artifact@v6.0.0
132- with :
133- name : ${{ matrix.config.name }}
134- path : ${{ matrix.config.binary }}
105+ # - name: Create Mac Image
106+ # run: |
107+ # brew install create-dmg
108+ # for i in {1..10};
109+ # do
110+ # 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;
111+ # done
112+
113+ # - name: Upload Simba Binary
114+ # uses: actions/upload-artifact@v6.0.0
115+ # with:
116+ # name: ${{ matrix.config.name }}
117+ # path: ${{ matrix.config.binary }}
0 commit comments