mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
Unify GitHub actions build-linux-docker jobs with a matrix.
This commit is contained in:
parent
7ab1fc1622
commit
1ee71c8bd8
183
.github/workflows/main.yml
vendored
183
.github/workflows/main.yml
vendored
@ -33,82 +33,19 @@ jobs:
|
||||
name: firebird-ubuntu-20.04-clang-x64
|
||||
path: gen/Firebird-*-linux-x64.tar.gz
|
||||
|
||||
build-linux-docker-x64:
|
||||
build-linux-docker:
|
||||
name: build-linux-docker-${{ matrix.arch }}
|
||||
runs-on: ubuntu-20.04
|
||||
container: asfernandes/firebird-builder:fb5-x64-ng-v1
|
||||
env:
|
||||
FB_DOCKER_PATH: ${{ (startsWith(matrix.arch, 'arm') && 'arm32-arm64') || 'x86-x64' }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 10
|
||||
|
||||
- name: Build
|
||||
run: /entry.sh
|
||||
|
||||
- name: Upload installer
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: firebird-linux-x64
|
||||
path: gen/Firebird-*-linux-x64.tar.gz
|
||||
|
||||
- name: Upload debug symbols
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: firebird-linux-x64-debugSymbols
|
||||
path: gen/Firebird-*-linux-x64-debugSymbols.tar.gz
|
||||
|
||||
- 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 "::set-output name=snapshot_name::${{ github.ref_name }}"
|
||||
|
||||
- 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-*-linux-x64*.tar.gz
|
||||
|
||||
- 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-*-linux-x64*.tar.gz
|
||||
|
||||
- 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-*-linux-x64*.tar.gz
|
||||
|
||||
build-linux-docker-x86:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch:
|
||||
- x86
|
||||
- x64
|
||||
- arm64
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -122,20 +59,20 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd builds/docker/linux/x32-x64
|
||||
./run-x32.sh
|
||||
cd builds/docker/linux/$FB_DOCKER_PATH
|
||||
./run-${{ matrix.arch }}.sh
|
||||
|
||||
- name: Upload installer
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: firebird-linux-x86
|
||||
path: gen/Firebird-*-linux-x86.tar.gz
|
||||
name: firebird-linux-${{ matrix.arch }}
|
||||
path: gen/Firebird-*-linux-${{ matrix.arch }}.tar.gz
|
||||
|
||||
- name: Upload debug symbols
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: firebird-linux-x86-debugSymbols
|
||||
path: gen/Firebird-*-linux-x86-debugSymbols.tar.gz
|
||||
name: firebird-linux-${{ matrix.arch }}-debugSymbols
|
||||
path: gen/Firebird-*-linux-${{ matrix.arch }}-debugSymbols.tar.gz
|
||||
|
||||
- name: Snapshot - prepare
|
||||
id: snapshot_prepare
|
||||
@ -156,7 +93,7 @@ jobs:
|
||||
fail-if-no-release: false
|
||||
fail-if-no-assets: false
|
||||
assets: |
|
||||
Firebird-*-linux-x86*.tar.gz
|
||||
Firebird-*-linux-${{ matrix.arch }}*.tar.gz
|
||||
|
||||
- name: Snapshot - release
|
||||
id: snapshot_release_try1
|
||||
@ -170,7 +107,7 @@ jobs:
|
||||
prerelease: true
|
||||
token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }}
|
||||
files: |
|
||||
gen/Firebird-*-linux-x86*.tar.gz
|
||||
gen/Firebird-*-linux-${{ matrix.arch }}*.tar.gz
|
||||
|
||||
- name: Snapshot - release (retry)
|
||||
uses: softprops/action-gh-release@v1
|
||||
@ -184,87 +121,7 @@ jobs:
|
||||
prerelease: true
|
||||
token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }}
|
||||
files: |
|
||||
gen/Firebird-*-linux-x86*.tar.gz
|
||||
|
||||
build-linux-docker-arm64:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 10
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd builds/docker/linux/arm32-arm64
|
||||
./run-arm64.sh
|
||||
|
||||
- name: Upload installer
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: firebird-linux-arm64
|
||||
path: gen/Firebird-*-linux-arm64.tar.gz
|
||||
|
||||
- name: Upload debug symbols
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: firebird-linux-arm64-debugSymbols
|
||||
path: gen/Firebird-*-linux-arm64-debugSymbols.tar.gz
|
||||
|
||||
- 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 "::set-output name=snapshot_name::${{ github.ref_name }}"
|
||||
|
||||
- name: Snapshot - delete old assets
|
||||
uses: asfernandes/delete-release-assets@v2
|
||||
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-*-linux-arm64*.tar.gz
|
||||
|
||||
- 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-*-linux-arm64*.tar.gz
|
||||
|
||||
- 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-*-linux-arm64*.tar.gz
|
||||
gen/Firebird-*-linux-${{ matrix.arch }}*.tar.gz
|
||||
|
||||
build-alpine-x64:
|
||||
runs-on: ubuntu-20.04
|
||||
|
Loading…
Reference in New Issue
Block a user