Skip to content

Commit

Permalink
GH Actions updates (#55)
Browse files Browse the repository at this point in the history
- Updated used GH actions, Lazarus is now at 3.0
- ARM build workflow now also run on pushes
- On manual workflow runs test output images are also uploaded as artifacts (to check if they're correct)
- Extended the versions dumps to log
  • Loading branch information
galfar committed Jan 6, 2024
1 parent a29039e commit c80f781
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 18 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/build-on-arm.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Build on ARM

on: [workflow_dispatch]
on:
# on each push and manual trigger
push:
branches: [ master ]
paths-ignore: [ "**/Readme.md" ]
workflow_dispatch:

jobs:
build_job:
Expand All @@ -16,9 +21,9 @@ jobs:
distro: ubuntu_latest

steps:
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2.2.1
name: Build artifact
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
name: Build binaries
id: build
with:
arch: ${{ matrix.arch }}
Expand All @@ -32,15 +37,24 @@ jobs:
apt-get -y install libtiff5
run: |
uname -a
fpc -iWTPTO
echo "FPC:" $(fpc -iWTPTO)
echo "OS:" $(uname -a)
./Scripts/compile.sh
cd Bin
./runtests.sh --no-tiff
- name: Upload Artifacts
uses: actions/upload-artifact@v3
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: deskew-binaries-${{ matrix.arch }}-${{ matrix.distro }}
path: |
Bin/deskew*
if-no-files-found: error

- name: Upload artifacts
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: deskew-artifacts-${{ matrix.arch }}-${{ matrix.distro }}
path: |
Expand Down
33 changes: 23 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
# currently stable="Lazarus 2.2.2 / FPC 3.2.2" with setup-lazarus@v3.2
# currently stable="Lazarus 3.0 / FPC 3.2.2" with setup-lazarus@v3.2.17
lazarus-versions: [stable]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Lazarus
uses: gcarreno/setup-lazarus@v3.2
uses: gcarreno/setup-lazarus@v3
with:
lazarus-version: ${{ matrix.lazarus-versions }}

- name: Print Lazarus version
run: lazbuild --version
- name: Print info
shell: bash
run: |
echo "Lazarus:" $(lazbuild --version)
echo "FPC:" $(fpc -iWTPTO)
echo "OS:" $(uname -a)
- name: Build Deskew CLI
shell: bash
Expand All @@ -47,7 +51,7 @@ jobs:
shell: bash
run: ls Bin

- name: Run tests
- name: Run tests
shell: bash
run: |
cd Bin
Expand All @@ -56,13 +60,22 @@ jobs:
elif [ "$RUNNER_OS" == "Windows" ]; then
./RunTests.bat
elif [ "$RUNNER_OS" == "macOS" ]; then
./runtests.sh deskew-mac
./runtests.sh deskew-mac --no-tiff
fi
- name: Upload Artifacts
uses: actions/upload-artifact@v3
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: deskew-binaries
name: deskew-binaries-${{ matrix.operating-system }}
path: |
Bin/deskew*
if-no-files-found: error

- name: Upload artifacts
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: deskew-artifacts-${{ matrix.operating-system }}
path: |
Bin
if-no-files-found: error

0 comments on commit c80f781

Please sign in to comment.