Skip to content

Commit e790207

Browse files
committed
Used the GithHub runner
1 parent 5475356 commit e790207

File tree

1 file changed

+42
-11
lines changed

1 file changed

+42
-11
lines changed

.github/workflows/main.yml

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,58 @@ on:
55
push:
66
branches:
77
- master
8-
paths:
8+
paths:
99
- 'SRC/define.inc'
1010
- 'SRC/SrvMain.pas'
1111
- 'SRC/Tiny.dpr'
1212
- 'SRC/xBase.pas'
13-
1413
workflow_dispatch:
1514

15+
env:
16+
fpc_ver: '3.2.2'
17+
fpc_installer_name: 'fpc_installer'
18+
19+
1620
jobs:
1721
build_windows:
18-
runs-on: self-hosted-windows-tinyweb
19-
22+
runs-on: windows-latest
2023
steps:
21-
- uses: actions/checkout@4
24+
- uses: actions/checkout@v4
25+
26+
- name: Set environment variables for FPC
27+
run: |
28+
echo "FPC_PATH=C:\FPC\${{ env.fpc_ver }}\bin\i386-win32\fpc.exe" >> $env:GITHUB_ENV
29+
echo "FPC_URL=https://sourceforge.net/projects/freepascal/files/Win32/${{ env.fpc_ver }}/fpc-${{ env.fpc_ver }}.win32.and.win64.exe/download" >> $env:GITHUB_ENV
30+
echo "FPC_INSTALLER_PATH=$Env:TEMP\${{ env.fpc_installer_name }}.exe" >> $env:GITHUB_ENV
31+
32+
- name: Print the environment variables set for FPC
33+
run: |
34+
gci env: | where name -like 'FPC_*'
35+
36+
- name: Download FreePascal installer
37+
run: |
38+
& 'curl.exe' @('-L', '-o', "$Env:FPC_INSTALLER_PATH", "$Env:FPC_URL")
39+
40+
- name: Install FreePascal silently
41+
run: |
42+
& "$Env:FPC_INSTALLER_PATH" @('/VERYSILENT', '/SUPPRESSMSGBOXES', '/NORESTART', '/SP-', '/LOG')
43+
Wait-Process -Name '${{ env.fpc_installer_name }}' -Timeout 600
44+
Remove-Item "$Env:FPC_INSTALLER_PATH"
45+
46+
47+
- name: Output the installation log
48+
run: |
49+
Get-ChildItem -Path "$Env:TEMP\Setup Log *.txt" | ForEach-Object {
50+
Write-Host "=== Log file: $($_.FullName) ==="
51+
Get-Content -Path $_.FullName
52+
}
2253
23-
- name: Compile TinyWeb with FreePascal 3.2.2 in ObjFPC mode
54+
- name: Compile TinyWeb with FreePascal in ObjFPC mode
55+
working-directory: ${{ github.workspace }}/SRC
2456
run: |
25-
cd $Env:GITHUB_WORKSPACE/SRC
26-
& 'C:\FPC\3.2.2\bin\i386-win32\fpc.exe' @('-B', '-MObjFPC', 'Tiny.dpr')
57+
& "$Env:FPC_PATH" @('-B', '-MObjFPC', 'Tiny.dpr')
2758
28-
- name: Compile TinyWeb with FreePascal 3.2.2 in Delphi mode
59+
- name: Compile TinyWeb with Delphi in Delphi mode
60+
working-directory: ${{ github.workspace }}/SRC
2961
run: |
30-
cd $Env:GITHUB_WORKSPACE/SRC
31-
& 'C:\FPC\3.2.2\bin\i386-win32\fpc.exe' @('-B', '-MDelphi', 'Tiny.dpr')
62+
& "$Env:FPC_PATH" @('-B', '-MDelphi', 'Tiny.dpr')

0 commit comments

Comments
 (0)