diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f54e17bc57..510ce79d93 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -124,6 +124,70 @@ jobs: files: | gen/Firebird-*-linux-${{ matrix.arch }}*.tar.gz + build-src-bundle-docker: + name: build-src-bundle-docker + runs-on: ubuntu-22.04 + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 10 + + - name: Build + run: | + cd builds/docker/linux/x86-x64 + ./run-src-bundle.sh + + - name: Snapshot - prepare + id: snapshot_prepare + if: | + github.repository == 'FirebirdSQL/firebird' && + github.event.head_commit.message == 'increment build number' && + github.ref_name == 'master' + run: | + echo "snapshot_name=${{ github.ref_name }}" >> $GITHUB_OUTPUT + + - name: Snapshot - delete old assets + uses: mknejp/delete-release-assets@v1 + if: steps.snapshot_prepare.outputs.snapshot_name + with: + repository: FirebirdSQL/snapshots + token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} + tag: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} + fail-if-no-release: false + fail-if-no-assets: false + assets: | + Firebird-*-source.tar.xz + + - name: Snapshot - release + id: snapshot_release_try1 + uses: softprops/action-gh-release@v1 + if: steps.snapshot_prepare.outputs.snapshot_name + continue-on-error: true + with: + repository: FirebirdSQL/snapshots + name: Latest snapshots for ${{ steps.snapshot_prepare.outputs.snapshot_name }} + tag_name: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} + prerelease: true + token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} + files: | + gen/Firebird-*-source.tar.xz + + - name: Snapshot - release (retry) + uses: softprops/action-gh-release@v1 + if: | + steps.snapshot_prepare.outputs.snapshot_name && + steps.snapshot_release_try1.outcome == 'failure' + with: + repository: FirebirdSQL/snapshots + name: Latest snapshots for ${{ steps.snapshot_prepare.outputs.snapshot_name }} + tag_name: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} + prerelease: true + token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} + files: | + gen/Firebird-*-source.tar.xz + build-alpine-x64: runs-on: ubuntu-20.04 container: alpine:3.14 diff --git a/builds/docker/linux/x86-x64/Dockerfile b/builds/docker/linux/x86-x64/Dockerfile index db7e49f7d4..9c28017cb5 100644 --- a/builds/docker/linux/x86-x64/Dockerfile +++ b/builds/docker/linux/x86-x64/Dockerfile @@ -203,7 +203,8 @@ RUN apt-get update && \ apt-get -y install \ cmake \ libfile-copy-recursive-perl \ - unzip && \ + unzip \ + xz-utils && \ rm -rf /var/lib/apt/lists/* RUN groupadd -g $ARG_CTNG_GID ctng && \ diff --git a/builds/docker/linux/x86-x64/run-src-bundle.sh b/builds/docker/linux/x86-x64/run-src-bundle.sh new file mode 100755 index 0000000000..be0a6ee1a2 --- /dev/null +++ b/builds/docker/linux/x86-x64/run-src-bundle.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker run --platform amd64 --rm --user `id -u`:`id -g` -v `pwd`/../../../..:/firebird -t --entrypoint /entry-src-bundle.sh asfernandes/firebird-builder:fb5-x64-ng-v1 diff --git a/builds/docker/linux/x86-x64/scripts/entry-src-bundle.sh b/builds/docker/linux/x86-x64/scripts/entry-src-bundle.sh new file mode 100755 index 0000000000..6b261fdac9 --- /dev/null +++ b/builds/docker/linux/x86-x64/scripts/entry-src-bundle.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +trap exit INT TERM +setarch $SET_ARCH /src-bundle.sh & +wait $! diff --git a/builds/docker/linux/x86-x64/scripts/src-bundle.sh b/builds/docker/linux/x86-x64/scripts/src-bundle.sh new file mode 100755 index 0000000000..ffb3dd1335 --- /dev/null +++ b/builds/docker/linux/x86-x64/scripts/src-bundle.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +./autogen.sh \ + --host=$BUILD_ARCH \ + --prefix=/opt/firebird \ + --enable-binreloc \ + --with-builtin-tomcrypt \ + --with-termlib=:libncurses.a \ + --with-atomiclib=:libatomic.a + +./src/misc/src_bundle.sh diff --git a/src/misc/src_bundle.sh b/src/misc/src_bundle.sh index 159a49d732..fc40cc83b0 100755 --- a/src/misc/src_bundle.sh +++ b/src/misc/src_bundle.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # The contents of this file are subject to the Initial # Developer's Public License Version 1.0 (the "License");