Skip to content

Updating to ubuntu 24.04 LTS Noble Numbat (#779) #312

Updating to ubuntu 24.04 LTS Noble Numbat (#779)

Updating to ubuntu 24.04 LTS Noble Numbat (#779) #312

name: Package Build
on:
push:
branches:
- main
- make-rpm
jobs:
get_mm:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install MM DBs
run: |
YOUR_ACCOUNT_ID=${{ secrets.MM_ACCOUNT_ID }} MAXMIND_LICENSE_KEY=${{ secrets.MM_DOWNLOAD_KEY }} ./bin/get_mm.sh
- name: 'Upload MM Geo DB'
uses: actions/upload-artifact@v4
with:
name: GeoLite2-Country.mmdb
path: config/GeoLite2-Country.mmdb
retention-days: 1
- name: 'Upload MM ASN DB'
uses: actions/upload-artifact@v4
with:
name: GeoLite2-ASN.mmdb
path: config/GeoLite2-ASN.mmdb
retention-days: 1
build:
needs: get_mm
runs-on: ubuntu-latest
# There's several of these lists of releases that we're building
# for scattered throughout these workflows. Hopefully one day GH
# makes it possible to define this in one place and then refer to
# it. In the meantime, if you're adding to this list, go look for
# other "matrix" definitions.
strategy:
matrix:
include:
- distro: ubi8
release: 8.10
pkg: rpm
image: redhat/ubi8
- distro: ubi9
release: 9.2
pkg: rpm
image: redhat/ubi9
- distro: ubuntu
release: focal
pkg: deb
image: ubuntu
- distro: ubuntu
release: jammy
pkg: deb
image: ubuntu
- distro: ubuntu
release: noble
pkg: deb
image: ubuntu
- distro: debian
release: bullseye
pkg: deb
image: debian
- distro: debian
release: buster
pkg: deb
image: debian
- distro: debian
release: bookworm
pkg: deb
image: debian
container:
image: ${{ matrix.image }}:${{ matrix.release }}
# NB: any run steps that need chf src need to have `working-directory: ${{ env.SRCDIR }}`
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get MM Geo
uses: dawidd6/action-download-artifact@v6
with:
name: GeoLite2-Country.mmdb
path: ./config
run_id: ${{ github.run_id }}
- name: Get MM Asn
uses: dawidd6/action-download-artifact@v6
with:
name: GeoLite2-ASN.mmdb
path: ./config
run_id: ${{ github.run_id }}
- name: Set Version
run: |
echo "RELEASE_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
echo KENTIK_KTRANSLATE_VERSION=`date +"kt-%Y-%m-%d-${GITHUB_RUN_ID}"` >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.22.6'
- name: Get Deps
run: |
if [ "${{ matrix.distro }}" = "centos" ]
then
yum install -y make gcc diffutils libpcap-devel
elif [ "${{ matrix.distro }}" = "ubi8" ]
then
yum install -y make gcc diffutils libpcap-devel
elif [ "${{ matrix.distro }}" = "ubi9" ]
then
yum install -y make gcc diffutils libpcap-devel
else
apt-get update
apt-get -y install make libpcap-dev ca-certificates build-essential curl
fi
- name: Run Make
run: |
echo ${{ env.KENTIK_KTRANSLATE_VERSION }}
echo ${{ env.RELEASE_VERSION }}
KENTIK_KTRANSLATE_VERSION=${{ env.KENTIK_KTRANSLATE_VERSION }} make
- name: Run Test
run: make test
- name: Create package
id: package
uses: kentik/pkg@master
with:
name: ktranslate
version: ${{ env.KENTIK_KTRANSLATE_VERSION }}
arch: x86_64
format: ${{ matrix.pkg }}
package: ktranslate-package.yml
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.package.outputs.package }}--${{ matrix.distro }}-${{ matrix.release }}
path: ${{ steps.package.outputs.package }}