chore(ci): move stream connectors to collect repository #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lua-cffi | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- stream-connectors/dependencies/lua-cffi/** | |
push: | |
branches: | |
- develop | |
- dev-[2-9][0-9].[0-9][0-9].x | |
- master | |
- "[2-9][0-9].[0-9][0-9].x" | |
paths: | |
- stream-connectors/dependencies/lua-cffi/** | |
jobs: | |
get-version: | |
uses: ./.github/workflows/get-version.yml | |
package: | |
needs: [get-version] | |
strategy: | |
fail-fast: false | |
matrix: | |
distrib: [el8, el9, bullseye, bookworm, jammy] | |
include: | |
- package_extension: rpm | |
image: packaging-stream-connectors-nfpm-alma8 | |
distrib: el8 | |
- package_extension: rpm | |
image: packaging-stream-connectors-nfpm-alma9 | |
distrib: el9 | |
- package_extension: deb | |
image: packaging-stream-connectors-nfpm-bullseye | |
distrib: bullseye | |
- package_extension: deb | |
image: packaging-stream-connectors-nfpm-bookworm | |
distrib: bookworm | |
- package_extension: deb | |
image: packaging-stream-connectors-nfpm-jammy | |
distrib: jammy | |
runs-on: ubuntu-22.04 | |
container: | |
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:${{ needs.get-version.outputs.version }} | |
credentials: | |
username: ${{ secrets.DOCKER_REGISTRY_ID }} | |
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} | |
name: package ${{ matrix.distrib }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Install dependencies | |
run: | | |
if [ "${{ matrix.package_extension }}" = "rpm" ]; then | |
dnf install -y make gcc gcc-c++ meson cmake libffi libffi-devel | |
else | |
apt-get update | |
apt-get install -y make gcc g++ meson cmake libffi-dev | |
if [ "${{ matrix.distrib }}" = "bookworm" ]; then | |
apt-get install -y libffi8 | |
else | |
apt-get install -y libffi7 | |
fi | |
fi | |
shell: bash | |
- name: Checkout cffi-lua sources | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
repository: "q66/cffi-lua" | |
path: "cffi-lua-src" | |
ref: "v0.2.3" | |
- name: Prepare packaging of lua-cffi | |
run: | | |
cd cffi-lua-src | |
mkdir build | |
cd build | |
if [ "${{ matrix.distrib }}" = "el9" ]; then | |
meson .. -Dlua_version=5.4 | |
else | |
meson .. -Dlua_version=5.3 | |
fi | |
ninja all | |
cd ../.. | |
mkdir -p stream-connectors/dependencies/lua-cffi/lua-cffi | |
mv cffi-lua-src/build/cffi.so stream-connectors/dependencies/lua-cffi/lua-cffi/ | |
shell: bash | |
- name: Package | |
uses: ./.github/actions/package | |
with: | |
nfpm_file_pattern: "stream-connectors/dependencies/lua-cffi/packaging/*.yaml" | |
distrib: ${{ matrix.distrib }} | |
package_extension: ${{ matrix.package_extension }} | |
arch: amd64 | |
major_version: ${{ needs.get-version.outputs.version }} | |
version: ${{ needs.get-version.outputs.version }}.0 | |
release: "1" | |
commit_hash: ${{ github.sha }} | |
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-lua-cffi-${{ matrix.distrib }} | |
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }} | |
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }} | |
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }} | |
stability: ${{ needs.get-version.outputs.stability }} | |
deliver-rpm: | |
if: ${{ contains(fromJson('["unstable", "testing", "stable"]'), needs.get-version.outputs.stability) }} | |
needs: [get-version, package] | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
distrib: [el8, el9] | |
name: deliver ${{ matrix.distrib }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Publish RPM packages | |
uses: ./.github/actions/delivery | |
with: | |
module_name: lua-cffi | |
distrib: ${{ matrix.distrib }} | |
version: ${{ needs.get-version.outputs.version }} | |
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} | |
cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-lua-cffi-${{ matrix.distrib }} | |
stability: ${{ needs.get-version.outputs.stability }} | |
deliver-deb: | |
if: ${{ contains(fromJson('["unstable", "testing", "stable"]'), needs.get-version.outputs.stability) }} | |
needs: [get-version, package] | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
distrib: [bullseye, bookworm, jammy] | |
name: deliver ${{ matrix.distrib }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Publish DEB packages | |
uses: ./.github/actions/delivery | |
with: | |
module_name: lua-cffi | |
distrib: ${{ matrix.distrib }} | |
version: ${{ needs.get-version.outputs.version }} | |
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} | |
cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-lua-cffi-${{ matrix.distrib }} | |
stability: ${{ needs.get-version.outputs.stability }} |