Skip to content

Commit

Permalink
Smoke test binaries for EL7 compatiblity
Browse files Browse the repository at this point in the history
This adds a quick smoke test of our binaries to verify we haven't exceeeded the
maximum GLIBC (2.17) version during linking which would break our ability to
execute on EL7 machines.
  • Loading branch information
dekimsey committed Jun 27, 2023
1 parent 72a9f2b commit 0cb728e
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,5 +313,43 @@ jobs:
docker.io/hashicorppreview/${{ env.PKG_NAME }}:${{ env.version }}-dev
docker.io/hashicorppreview/${{ env.PKG_NAME }}:${{ env.version }}-${{ github.sha }}
minimum-os:
name: OS Compatibility
# A quick smoke test of our binaries on our minimum target OS (RHEL 7). Why RHEL 7? Because the glibc version is that old (2.17).
needs:
- get-go-version
- get-product-version
- build-linux
runs-on: ubuntu-22.04
strategy:
fail-fast: false
# Note: Ideally we'd test all our target archs, unfortunately availability of containers of these OS's vary.
# For instance there is no ubi7 image for arm64 (there is on ubi8), RHBZ#1728771. And none at all for arm.
# So we have to settle for only being able to validate where we can, which is just amd64.
matrix:
goos: [linux]
goarch: [amd64]
steps:
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{needs.get-go-version.outputs.go-version}}
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
- name: Test binary
env:
artifact_name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
run: |
echo "::group::Unpack and Prep"
docker pull registry.access.redhat.com/ubi7/ubi-minimal:7.9-1057
unzip "$artifact_name"
echo "::group::Diagnostics"
echo "CGO related build information:"
go version -m ./nomad | grep CGO
echo "GLIBC links:"
go tool nm ./nomad | grep -i glibc | cut -d @ -f 2-3 | sort --version-sort | uniq
echo "::group::Smoke test binary"
docker run --rm -v "$PWD:/src" registry.access.redhat.com/ubi7/ubi-minimal:7.9-1057 /src/nomad version
permissions:
contents: read

0 comments on commit 0cb728e

Please sign in to comment.