Skip to content

Commit

Permalink
Add cgolessbuild test job (#210)
Browse files Browse the repository at this point in the history
* Add cgolessbuild test job

* Clarify cgoless job description
  • Loading branch information
dagood authored Nov 10, 2024
1 parent c51a090 commit 0e4965e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,23 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Run Test
run: go test -v ./...

# Verify that golang-fips/openssl builds successfully without cgo enabled.
#
# A project can avoid attempting to build the openssl package by only
# importing it from Go files with a cgo build tag. However, this isn't always
# reasonable. In that case, we can help by making sure the openssl package
# builds successfully even without cgo.
#
# For example, the Microsoft Go toolset fork builds this module without cgo
# for a cross-platform build.
#
# The golang-fips/openssl module can't do any crypto when built without cgo,
# but it exports a few simple functions and types.
cgolessbuild:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Run Build
run: CGO_ENABLED=0 go build ./...

0 comments on commit 0e4965e

Please sign in to comment.