Skip to content

Updates for otel module #47

Updates for otel module

Updates for otel module #47

Workflow file for this run

name: GitHub CI
on:
pull_request:
push:
workflow_dispatch:
defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
jobs:
generate-matrix:
runs-on: ubuntu-24.04
outputs:
matrix-alpine: ${{ steps.set-matrix.outputs.matrix-alpine }}
matrix-ubuntu: ${{ steps.set-matrix.outputs.matrix-ubuntu }}
matrix-redhat: ${{ steps.set-matrix.outputs.matrix-redhat }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Figure out what targets we're building for
working-directory: debian
run: |
targets=""
for target in $(make list-all-modules | cut -d ' ' -f 1); do
targets="$targets module-$target";
done
echo targets="base $targets" >> $GITHUB_ENV
- name: set-matrix
id: set-matrix
run: |
for os in alpine ubuntu; do
jq -nRr '"matrix-" + $os +"=" + ( { include: [ $ARGS.positional[] | {target: . } ] } | tojson)' --arg os $os --args $targets >> $GITHUB_OUTPUT
done
for os in redhat; do
jq -nRr '"matrix-" + $os +"=" + ( { include: [ $ARGS.positional[] | {target: . } ] } | tojson)' --arg os $os --args ${targets/ module-geoip/} >> $GITHUB_OUTPUT
done
alpine:
needs: generate-matrix
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix-alpine)}}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup Alpine Linux
uses: jirutka/setup-alpine@v1
with:
branch: v3.20
packages: >
abuild
build-base
coreutils
curl
findutils
git
make
xz
- name: Create build depends
shell: alpine.sh {0}
working-directory: alpine
run: |
make abuild-${{ matrix.target }}
- name: Install build depends
shell: alpine.sh --root {0}
working-directory: alpine
run: |
apk add $(. ./abuild-${{ matrix.target }}/APKBUILD; echo $makedepends;)
- name: Build ${{ matrix.target }}
shell: alpine.sh {0}
working-directory: alpine
run: |
make ${{ matrix.target }}
- name: List what has been built
shell: alpine.sh {0}
if: ${{ !cancelled() }}
run: |
find ~/packages/alpine -type f | xargs ls -ld
ubuntu:
runs-on: ubuntu-24.04
needs: generate-matrix
strategy:
fail-fast: false
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix-ubuntu)}}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup Ubuntu
run: |
sudo apt-get update
sudo apt-get install -y --no-install-suggests --no-install-recommends \
curl \
devscripts \
equivs \
git \
libxml2-utils \
lsb-release \
xsltproc
- name: Create and install build depends for ${{ matrix.target }} and build it
working-directory: debian
run: |
NGINX_VERSION=$(make --eval 'nv:; @echo $(BASE_VERSION)' nv)
make rules-${{ matrix.target }}
sudo mk-build-deps --install --tool="apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes" \
debuild-${{ matrix.target }}/nginx-${NGINX_VERSION}/debian/control
make ${{ matrix.target }}
- name: List what has been built
if: ${{ !cancelled() }}
run: |
find .. -mindepth 1 -maxdepth 1 -name "*.deb" | xargs ls -ld
redhat:
needs: generate-matrix
runs-on: ubuntu-24.04
container: almalinux:9
strategy:
fail-fast: false
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix-redhat )}}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup AlmaLinux
run: |
dnf makecache
dnf install -y \
g++ \
gcc \
git \
epel-release \
libxslt \
make \
rpm-build \
which \
xz \
'dnf-command(config-manager)'
dnf config-manager --set-enabled crb
- name: Create and install build depends for ${{ matrix.target }} and build it
working-directory: rpm/SPECS
run: |
case ${{ matrix.target }} in
base)
spec="nginx.spec"
;;
*)
spec="nginx-${{ matrix.target }}.spec"
;;
esac
make $spec
dnf -y builddep ./${spec}
make ${{ matrix.target }}
- name: List what has been built
if: ${{ !cancelled() }}
run: |
find rpm/RPMS -type f | xargs ls -ld