make.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. name: Make
  2. on:
  3. schedule:
  4. - cron: '0 0 1 * *'
  5. push:
  6. branches:
  7. - "**"
  8. pull_request:
  9. branches:
  10. - master
  11. - main
  12. concurrency:
  13. group: ${{ github.workflow }}-${{ github.ref }}
  14. cancel-in-progress: true
  15. jobs:
  16. build:
  17. runs-on: ${{ matrix.os }}
  18. timeout-minutes: 120
  19. strategy:
  20. matrix:
  21. os:
  22. - ubuntu-latest
  23. - windows-latest
  24. steps:
  25. - name: Checkout
  26. uses: actions/checkout@v4
  27. with:
  28. submodules: true
  29. - name: Build on Linux
  30. if: runner.os == 'Linux'
  31. shell: bash
  32. run: |
  33. set -xeuo pipefail
  34. sudo bash -c 'apt-get update; apt-get install -y lazarus' >/dev/null
  35. instantfpc -Fu/usr/lib/lazarus/*/components/lazutils \
  36. -B '.github/workflows/make.pas'
  37. - name: Build on Windows
  38. if: runner.os == 'Windows'
  39. shell: powershell
  40. run: |
  41. $ErrorActionPreference = 'stop'
  42. Set-PSDebug -Strict
  43. Write-Host "Installing Lazarus and OpenSSL 1.1 via Chocolatey..."
  44. choco upgrade chocolatey -y
  45. choco install lazarus -y
  46. choco install openssl.light --version=1.1.1.20181020 -y
  47. Write-Host "Verifying installed packages..."
  48. choco list
  49. # Lazarus installs to C:\Lazarus by default
  50. # Add Lazarus and OpenSSL paths for instantfpc
  51. $env:Path += ';C:\Lazarus;C:\Lazarus\fpc\3.2.2\bin\x86_64-win64;C:\ProgramData\chocolatey\lib\openssl.light\tools'
  52. Write-Host "Checking lazbuild and instantfpc availability..."
  53. Get-Command lazbuild
  54. Get-Command instantfpc
  55. Write-Host "Building make.pas..."
  56. instantfpc -FuC:\Lazarus\components\lazutils `
  57. -B '.github/workflows/make.pas'