From c80f78130a80bfd35dfc45a4d9037940ea4de8fb Mon Sep 17 00:00:00 2001 From: Marek Mauder Date: Sat, 6 Jan 2024 02:09:50 +0100 Subject: [PATCH] GH Actions updates (#55) - 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 --- .github/workflows/build-on-arm.yml | 30 +++++++++++++++++++-------- .github/workflows/ci.yml | 33 +++++++++++++++++++++--------- 2 files changed, 45 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-on-arm.yml b/.github/workflows/build-on-arm.yml index a906235..67fe3b8 100644 --- a/.github/workflows/build-on-arm.yml +++ b/.github/workflows/build-on-arm.yml @@ -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: @@ -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 }} @@ -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: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc761d6..6db031d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -47,7 +51,7 @@ jobs: shell: bash run: ls Bin - - name: Run tests + - name: Run tests shell: bash run: | cd Bin @@ -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