|
| 1 | +name: test |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_run: |
| 5 | + workflows: [windows-build] |
| 6 | + types: |
| 7 | + - completed |
| 8 | + branches: |
| 9 | + - '**' |
| 10 | + |
| 11 | +jobs: |
| 12 | + test: |
| 13 | + name: ${{ matrix.config.name }} |
| 14 | + runs-on: ${{ matrix.config.os }} |
| 15 | + defaults: |
| 16 | + run: |
| 17 | + shell: bash |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + config: |
| 22 | + - os: windows-latest |
| 23 | + name: Windows 64 |
| 24 | + laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%202.2.4/lazarus-2.2.4-fpc-3.2.2-win64.exe |
| 25 | + |
| 26 | + - os: windows-latest |
| 27 | + name: Windows 32 |
| 28 | + laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%202.2.4/lazarus-2.2.4-fpc-3.2.2-win32.exe |
| 29 | + |
| 30 | + steps: |
| 31 | + - name: Download artifacts |
| 32 | + uses: actions/github-script@v3.1.0 |
| 33 | + with: |
| 34 | + script: | |
| 35 | + var fs = require('fs'); |
| 36 | + var artifacts = await github.actions.listWorkflowRunArtifacts({ |
| 37 | + owner: context.repo.owner, |
| 38 | + repo: context.repo.repo, |
| 39 | + run_id: ${{ github.event.workflow_run.id }}, |
| 40 | + }); |
| 41 | + for (artifact of artifacts.data.artifacts) { |
| 42 | + var download = await github.actions.downloadArtifact({ |
| 43 | + owner: context.repo.owner, |
| 44 | + repo: context.repo.repo, |
| 45 | + artifact_id: artifact.id, |
| 46 | + archive_format: 'zip', |
| 47 | + }); |
| 48 | + fs.writeFileSync(artifact.name, Buffer.from(download.data)); |
| 49 | + console.log('Downloaded: ' + artifact.name); |
| 50 | + } |
| 51 | +
|
| 52 | + - name: Install Lazarus |
| 53 | + uses: ollydev/setup-lazarus@v3.2 |
| 54 | + with: |
| 55 | + laz-url: ${{ matrix.config.laz-url }} |
| 56 | + fpc-url: ${{ matrix.config.fpc-url }} |
| 57 | + |
| 58 | + - name: Test Installation |
| 59 | + run: | |
| 60 | + lazbuild --version |
| 61 | + ls |
| 62 | +
|
| 63 | + - name: Build |
| 64 | + run: | |
| 65 | + lazbuild test/test.lpi |
0 commit comments