123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- ---
- name: Make
- on:
- schedule:
- - cron: '0 0 1 * *'
- push:
- branches:
- - "**"
- pull_request:
- branches:
- - master
- - main
- concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
- jobs:
- build:
- runs-on: ${{ matrix.os }}
- timeout-minutes: 120
- strategy:
- matrix:
- os:
- - ubuntu-latest
- - windows-latest
- - macos-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- submodules: true
- - name: Build on Linux
- if: runner.os == 'Linux'
- shell: bash
- run: |
- set -xeuo pipefail
- sudo bash -c 'apt-get update; apt-get install -y lazarus cppcheck pylint shellcheck' >/dev/null
- declare -rx INSTANTFPCOPTIONS=-Fu/usr/lib/lazarus/*/components/lazutils
- instantfpc '.github/workflows/make.pas' build
- - name: Build
- if: runner.os == 'Macos'
- shell: python
- run: |
- """https://macappstore.org/lazarus"""
- import os
- import sys
- import subprocess
- subprocess.run(
- "openssl version -d".split(),
- check=True,
- capture_output=True,
- )
- OPENSSL=subprocess.run(
- "brew --prefix [email protected]".split(),
- check=True,
- capture_output=True,
- ).stdout.decode().strip("\n")
- os.environ["PATH"] += f":{OPENSSL}/bin"
- os.environ["DYLD_LIBRARY_PATH"] = f"{OPENSSL}/lib"
- subprocess.run(
- "brew install --cask lazarus".split(),
- check=True,
- capture_output=True,
- )
- os.environ["INSTANTFPCOPTIONS"] = "-Fu/Applications/Lazarus/components/lazutils"
- os.environ["PATH"] += ":/Applications/Lazarus"
- subprocess.run(
- "lazbuild -v".split(),
- check=True,
- capture_output=True,
- )
- os.environ["INSTANTFPCOPTIONS"] = "-Fu/Applications/Lazarus/components/lazutils"
- sys.exit(subprocess.run(
- "instantfpc .github/workflows/make.pas build".split(),
- ).returncode)
- - name: Build on Windows
- if: runner.os == 'Windows'
- shell: powershell
- run: |
- New-Variable -Option Constant -Name VAR -Value @{
- Uri = 'http://consume.o2switch.net/lazarus/lazarus-4.0-fpc-3.2.2-win64.exe'
- OutFile = (New-TemporaryFile).FullName + '.exe'
- }
- Invoke-WebRequest @VAR
- & $VAR.OutFile.Replace('Temp', 'Temp\.') /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART | Out-Null
- $Env:PATH+=';C:\Lazarus'
- $Env:PATH+=';C:\Lazarus\fpc\3.2.2\bin\x86_64-win64'
- (Get-Command 'lazbuild').Source | Out-Host
- (Get-Command 'instantfpc').Source | Out-Host
- $Env:INSTANTFPCOPTIONS='-FuC:\Lazarus\components\lazutils'
- instantfpc '.github\workflows\make.pas' build
|