diff --git a/.github/workflows/make.yml b/.github/workflows/main.yml similarity index 56% rename from .github/workflows/make.yml rename to .github/workflows/main.yml index 32e3d89..d3568c5 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/main.yml @@ -2,38 +2,31 @@ name: Make on: - push: - branches: - - "**" pull_request: branches: - master -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - jobs: build: runs-on: ${{ matrix.os }} - timeout-minutes: 120 + timeout-minutes: 12 strategy: matrix: os: - ubuntu-latest - - windows-latest + steps: - name: Checkout uses: actions/checkout@v7 with: - submodules: true + submodules: recursive - name: Build on Linux - if: runner.os == 'Linux' + if: runner.os != 'Windows' shell: bash - run: bash -x make.sh build + run: bash -x '.github/workflows/make.sh' build - name: Build on Windows if: runner.os == 'Windows' shell: powershell - run: pwsh -File make.ps1 build + run: pwsh -File '.github/workflows/make.ps1' build diff --git a/make.ps1 b/.github/workflows/make.ps1 similarity index 75% rename from make.ps1 rename to .github/workflows/make.ps1 index 02f8503..f3247d6 100644 --- a/make.ps1 +++ b/.github/workflows/make.ps1 @@ -50,7 +50,8 @@ Function Install-Program { & msiexec /passive /package $FilePath | Out-Host } 'exe' { - & $FilePath /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART | Out-Host + $arguments = @('/SP-', '/VERYSILENT', '/NORESTART', '/SUPPRESSMSGBOXES') + Start-Process -FilePath $FilePath -ArgumentList $arguments -Wait -NoNewWindow } } Remove-Item $FilePath -Force @@ -62,7 +63,7 @@ Function Install-Program { Function Build-Project { $VAR = @{ Cmd = 'lazbuild' - Url = 'https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%204.8/lazarus-4.8-fpc-3.2.2-win64.exe/download' + Url = 'https://download.lazarus-ide.org/Lazarus%20Windows%2064%20bits/Lazarus%204.8/lazarus-4.8-fpc-3.2.2-win64.exe' Path = "C:\Lazarus" } Try { @@ -80,21 +81,8 @@ Function Build-Project { Throw "Failed to download Lazarus" } } - If ( Test-Path -Path 'use\components.txt' ) { - & git submodule update --recursive --init | Out-Host - & git submodule update --recursive --remote | Out-Host - Get-Content -Path 'use\components.txt' | ForEach-Object { - If ((-not (& lazbuild --verbose-pkgsearch $_ | Out-Null)) -and - (-not (& lazbuild --add-package $_ | Out-Null)) -and - (-not (Test-Path -Path 'use\components.txt'))) { - $OutFile = Request-File "https://packages.lazarus-ide.org/$($_).zip" - Expand-Archive -Path $OutFile -DestinationPath "use\$($_)" -Force - Remove-Item $OutFile - } - } - Get-ChildItem -Filter '*.lpk' -Recurse -File –Path 'use' | ForEach-Object { - & lazbuild --add-package-link $_ | Out-Host - } + Get-ChildItem -Filter '*.lpk' -Recurse -File –Path 'use' | ForEach-Object { + & lazbuild --add-package-link $_ | Out-Host } Get-ChildItem -Filter '*.lpi' -Recurse -File –Path 'src' | ForEach-Object { & lazbuild --no-write-project --recursive --build-mode=release $_ | Out-Host diff --git a/make.sh b/.github/workflows/make.sh similarity index 62% rename from make.sh rename to .github/workflows/make.sh index bf2e4e2..c7c887a 100644 --- a/make.sh +++ b/.github/workflows/make.sh @@ -20,25 +20,7 @@ function priv_lazbuild ;; esac fi - if [[ -f 'use/components.txt' ]]; then - git submodule update --init --recursive - git submodule update --recursive --remote - while read -r; do - if [[ -n "${REPLY}" ]] && - ! (lazbuild --verbose-pkgsearch "${REPLY}") && - ! (lazbuild --add-package "${REPLY}") && - ! [[ -f "use/${REPLY}" ]]; then - declare -A VAR=( - [url]="https://packages.lazarus-ide.org/${REPLY}.zip" - [out]=$(mktemp) - ) - wget --output-document "${VAR[out]}" "${VAR[url]}" >/dev/null - unzip -o "${VAR[out]}" -d "use/${REPLY}" - rm --verbose "${VAR[out]}" - fi - done < 'use/components.txt' - find 'use' -type 'f' -name '*.lpk' -exec lazbuild --add-package-link {} + - fi + find 'use' -type 'f' -name '*.lpk' -exec lazbuild --add-package-link {} + find 'src' -type 'f' -name '*.lpi' \ -exec lazbuild --no-write-project --recursive --no-write-project --build-mode=release {} + 1>&2 ) diff --git a/use/components.txt b/use/components.txt deleted file mode 100644 index e69de29..0000000