-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh(ci): package lua dependencies using nfpm (#175)
Refs: MON-33552
- Loading branch information
1 parent
dce5ece
commit b5f46c2
Showing
29 changed files
with
560 additions
and
588 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
name: lua-cffi | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- dependencies/lua-cffi/** | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
paths: | ||
- dependencies/lua-cffi/** | ||
|
||
jobs: | ||
get-environment: | ||
uses: ./.github/workflows/get-environment.yml | ||
|
||
package: | ||
needs: [get-environment] | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
distrib: [el8, el9, bullseye] | ||
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 | ||
|
||
runs-on: ubuntu-22.04 | ||
|
||
container: | ||
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest | ||
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 libffi7 libffi-dev | ||
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 dependencies/lua-cffi/lua-cffi | ||
mv cffi-lua-src/build/cffi.so dependencies/lua-cffi/lua-cffi/ | ||
shell: bash | ||
|
||
- name: Package | ||
uses: ./.github/actions/package-nfpm | ||
with: | ||
nfpm_file_pattern: "dependencies/lua-cffi/packaging/*.yaml" | ||
distrib: ${{ matrix.distrib }} | ||
package_extension: ${{ matrix.package_extension }} | ||
arch: amd64 | ||
version: "0.2.3" | ||
commit_hash: ${{ github.sha }} | ||
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ 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 }} | ||
|
||
deliver-rpm: | ||
if: ${{ contains(fromJson('["unstable", "testing", "stable"]'), needs.get-environment.outputs.stability) }} | ||
needs: [get-environment, 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/rpm-delivery | ||
with: | ||
module_name: lua-cffi | ||
distrib: ${{ matrix.distrib }} | ||
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} | ||
cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-lua-cffi-${{ matrix.distrib }} | ||
stability: ${{ needs.get-environment.outputs.stability }} | ||
|
||
deliver-deb: | ||
if: ${{ contains(fromJson('["unstable", "testing", "stable"]'), needs.get-environment.outputs.stability) }} | ||
needs: [get-environment, package] | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
distrib: [bullseye] | ||
name: deliver ${{ matrix.distrib }} | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Publish DEB packages | ||
uses: ./.github/actions/deb-delivery | ||
with: | ||
module_name: lua-cffi | ||
distrib: ${{ matrix.distrib }} | ||
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} | ||
cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-lua-cffi-${{ matrix.distrib }} | ||
stability: ${{ needs.get-environment.outputs.stability }} |
Oops, something went wrong.