commit 9041d7eda8838ebd50702e6ccc2e0ebb8b9e5fc4 from: Sergey Vorontsov via: Yaroslav Lobankov date: Mon Jul 03 13:11:11 2023 UTC ci: add workflow for static build packaging The created packages can be found in the job artifacts. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci Co-authored-by: Yaroslav Lobankov commit - ed4060039e0027da1270ed32bd9233c5fa65f36e commit + 9041d7eda8838ebd50702e6ccc2e0ebb8b9e5fc4 blob - /dev/null blob + fd859e1575a2212fde1c2a327395c4f45669e54d (mode 644) --- /dev/null +++ .github/workflows/static_build_packaging.yml @@ -0,0 +1,83 @@ +name: static_build_packaging + +on: + push: + branches: + - 'master' + - 'release/**' + tags: + - '**' + pull_request: + types: [ opened, reopened, synchronize, labeled ] + workflow_dispatch: + +concurrency: + # Update of a developer branch cancels the previously scheduled workflow + # run for this branch. However, the 'master' branch, release branch, and + # tag workflow runs are never canceled. + # + # We use a trick here: define the concurrency group as 'workflow run ID' + + # 'workflow run attempt' because it is a unique combination for any run. + # So it effectively discards grouping. + # + # Important: we cannot use `github.sha` as a unique identifier because + # pushing a tag may cancel a run that works on a branch push event. + group: ${{ ( + github.ref == 'refs/heads/master' || + startsWith(github.ref, 'refs/heads/release/') || + startsWith(github.ref, 'refs/tags/')) && + format('{0}-{1}', github.run_id, github.run_attempt) || + format('{0}-{1}', github.workflow, github.ref) }} + cancel-in-progress: true + +jobs: + static_build_packaging: + name: 'static_build_packaging (${{ matrix.arch }})' + + # Run on push to the 'master' and release branches of tarantool/tarantool + # or on pull request if the 'full-ci' or 'static-build-ci' label is set. + if: github.repository == 'tarantool/tarantool' && + ( github.event_name != 'pull_request' || + contains(github.event.pull_request.labels.*.name, 'full-ci') || + contains(github.event.pull_request.labels.*.name, 'static-build-ci') ) + + runs-on: ${{ matrix.runner }} + + strategy: + fail-fast: false + matrix: + include: + - runner: ubuntu-20.04-self-hosted + arch: x86_64 + - runner: graviton + arch: aarch64 + + steps: + - name: Prepare checkout + uses: tarantool/actions/prepare-checkout@master + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: recursive + - uses: ./.github/actions/environment + - name: Install deps + uses: ./.github/actions/install-deps-debian + - name: Build static packages + run: make -f .pack.mk package-static + - name: Upload build artifacts + if: github.ref == 'refs/heads/master' || + startsWith(github.ref, 'refs/heads/release/') || + startsWith(github.ref, 'refs/tags/') + uses: actions/upload-artifact@v3 + with: + name: tarantool-deb-rpm-x86_64-aarch64 + retention-days: 21 + path: | + static-build/build/tarantool*.deb + static-build/build/tarantool*.rpm + if-no-files-found: error + - name: Send VK Teams message on failure + if: failure() + uses: ./.github/actions/report-job-status + with: + bot-token: ${{ secrets.VKTEAMS_BOT_TOKEN }}