-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: build debian packages on push release tag
- Loading branch information
Showing
2 changed files
with
91 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
build-debian-package-ubuntu22.04: | ||
name: build (Ubuntu 22.04) | ||
runs-on: builder | ||
container: | ||
image: yanetplatform/builder | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
export YANET_VERSION=${{github.ref_name}} | ||
export YANET_VERSION=${YANET_VERSION:1} | ||
export YANET_VERSION_MAJOR=${YANET_VERSION%.*} | ||
export YANET_VERSION_MINOR=${YANET_VERSION#*.} | ||
export YANET_VERSION_REVISION=${{github.run_number}} | ||
export YANET_VERSION_HASH=${{github.sha}} | ||
export YANET_VERSION_CUSTOM=stable | ||
meson setup --prefix=/target \ | ||
-Dtarget=release \ | ||
-Dyanet_config=release,l3balancer,firewall \ | ||
-Darch=corei7,broadwell,knl \ | ||
-Dversion_major=$YANET_VERSION_MAJOR \ | ||
-Dversion_minor=$YANET_VERSION_MINOR \ | ||
-Dversion_revision=$YANET_VERSION_REVISION \ | ||
-Dversion_hash=$YANET_VERSION_HASH \ | ||
-Dversion_custom=$YANET_VERSION_CUSTOM \ | ||
build | ||
meson compile -C build | ||
- run: meson install -C build | ||
- run: | | ||
cp -r debian /target/DEBIAN | ||
sed -i "s/__VERSION__/${YANET_VERSION}/g" /target/DEBIAN/control | ||
- run: | | ||
mkdir /export | ||
dpkg-deb -b "/target" /export/yanet_${YANET_VERSION}_ubuntu22.04.deb | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: target_debian | ||
path: /export/yanet*.deb | ||
|
||
build-debian-package-ubuntu18.04: | ||
name: build (Ubuntu 18.04) | ||
runs-on: builder | ||
container: | ||
image: yanetplatform/builder_ubuntu18.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
export YANET_VERSION=${{github.ref_name}} | ||
export YANET_VERSION=${YANET_VERSION:1} | ||
export YANET_VERSION_MAJOR=${YANET_VERSION%.*} | ||
export YANET_VERSION_MINOR=${YANET_VERSION#*.} | ||
export YANET_VERSION_REVISION=${{github.run_number}} | ||
export YANET_VERSION_HASH=${{github.sha}} | ||
export YANET_VERSION_CUSTOM=stable | ||
meson setup --prefix=/target \ | ||
-Dtarget=release \ | ||
-Dyanet_config=release,l3balancer,firewall \ | ||
-Darch=corei7,broadwell,knl \ | ||
-Dversion_major=$YANET_VERSION_MAJOR \ | ||
-Dversion_minor=$YANET_VERSION_MINOR \ | ||
-Dversion_revision=$YANET_VERSION_REVISION \ | ||
-Dversion_hash=$YANET_VERSION_HASH \ | ||
-Dversion_custom=$YANET_VERSION_CUSTOM \ | ||
build | ||
meson compile -C build | ||
- run: meson install -C build | ||
- run: | | ||
cp -r debian /target/DEBIAN | ||
sed -i "s/__VERSION__/${YANET_VERSION}/g" /target/DEBIAN/control | ||
- run: | | ||
mkdir /export | ||
dpkg-deb -b "/target" /export/yanet_${YANET_VERSION}_ubuntu18.04.deb | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: target_debian | ||
path: /export/yanet*.deb |
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,8 @@ | ||
Package: yanet | ||
Version: __VERSION__ | ||
Architecture: amd64 | ||
Section: net | ||
Maintainer: Timur Aitov <[email protected]> | ||
Homepage: https://github.com/yanet-platform/yanet | ||
Description: Software forwarding traffic based on DPDK | ||
YANET is an open-source extensible framework for software forwarding traffic based on DPDK |