@@ -24,9 +24,13 @@ permissions:
2424jobs :
2525 build-artifacts :
2626 runs-on : ubuntu-latest
27- strategy :
28- matrix :
29- cgo_variant : ['nocgo', 'cgo']
27+
28+ # TODO_INVESTIGATE: CGO matrix builds disabled - https://github.com/pokt-network/poktroll/discussions/1822
29+ # To re-enable: Uncomment the strategy block below to build both CGO and non-CGO variants
30+ # strategy:
31+ # matrix:
32+ # cgo_variant: ['nocgo', 'cgo']
33+
3034 steps :
3135 - uses : actions/checkout@v4
3236 with :
@@ -37,10 +41,12 @@ jobs:
3741 with :
3842 go-version : " 1.24.3"
3943
40- - name : Install cross-compilers for CGO (linux/amd64 + linux/arm64)
41- run : |
42- sudo apt-get update
43- sudo apt-get install -y gcc-aarch64-linux-gnu gcc-x86-64-linux-gnu
44+ # TODO_INVESTIGATE: CGO cross-compilers disabled - https://github.com/pokt-network/poktroll/discussions/1822
45+ # To re-enable: Uncomment the step below to install cross-compilers for CGO builds
46+ # - name: Install cross-compilers for CGO (linux/amd64 + linux/arm64)
47+ # run: |
48+ # sudo apt-get update
49+ # sudo apt-get install -y gcc-aarch64-linux-gnu gcc-x86-64-linux-gnu
4450
4551 - name : install ignite
4652 # The ignite tarballs are named like ignite_29.0.0-rc.1_Linux_x86_64.tar.gz
@@ -53,26 +59,36 @@ jobs:
5359 # - name: Generate protobufs
5460 # run: make proto_regen
5561
56- - name : Build binaries for specific variant
62+ - name : Build binaries (CGO disabled)
5763 run : |
5864 make ignite_update_ldflags
59-
60- # Build cosmovisor (needed by both variants)
6165 make cosmovisor_cross_compile
6266
63- # Build specific variant
64- if [[ "${{ matrix.cgo_variant }}" == "cgo" ]]; then
65- echo "Building CGO-enabled binaries..."
66- make ignite_release_cgo_enabled
67- else
68- echo "Building CGO-disabled binaries..."
69- make ignite_release_cgo_disabled
70- fi
67+ echo "Building CGO-disabled binaries..."
68+ make ignite_release_cgo_disabled
7169
72- # Repackage and extract
7370 make ignite_release_repackage
7471 make ignite_release_extract_binaries
7572
73+ # TODO_INVESTIGATE: CGO builds disabled - https://github.com/pokt-network/poktroll/discussions/1822
74+ # To re-enable: Replace the step above with the conditional build below
75+ # - name: Build binaries for specific variant
76+ # run: |
77+ # make ignite_update_ldflags
78+ # make cosmovisor_cross_compile
79+ #
80+ # # Build specific variant based on matrix
81+ # if [[ "${{ matrix.cgo_variant }}" == "cgo" ]]; then
82+ # echo "Building CGO-enabled binaries..."
83+ # make ignite_release_cgo_enabled
84+ # else
85+ # echo "Building CGO-disabled binaries..."
86+ # make ignite_release_cgo_disabled
87+ # fi
88+ #
89+ # make ignite_release_repackage
90+ # make ignite_release_extract_binaries
91+
7692 - name : Free disk space
7793 run : |
7894 echo "=== Disk usage before cleanup ==="
@@ -93,14 +109,9 @@ jobs:
93109 # Base images
94110 echo "images=ghcr.io/pokt-network/pocketd,ghcr.io/pokt-network/poktrolld" >> $GITHUB_OUTPUT
95111
96- # CGO suffix and dockerfile selection
97- if [[ "${{ matrix.cgo_variant }}" == "cgo" ]]; then
98- echo "cgo_suffix=-cgo" >> $GITHUB_OUTPUT
99- echo "dockerfile=Dockerfile.release.cgo" >> $GITHUB_OUTPUT
100- else
101- echo "cgo_suffix=" >> $GITHUB_OUTPUT
102- echo "dockerfile=Dockerfile.release" >> $GITHUB_OUTPUT
103- fi
112+ # CGO suffix and dockerfile selection (CGO disabled)
113+ echo "cgo_suffix=" >> $GITHUB_OUTPUT
114+ echo "dockerfile=Dockerfile.release" >> $GITHUB_OUTPUT
104115
105116 # Event-specific tag suffix
106117 if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
@@ -117,6 +128,38 @@ jobs:
117128 fi
118129 fi
119130
131+ # TODO_INVESTIGATE: CGO builds disabled - https://github.com/pokt-network/poktroll/discussions/1822
132+ # To re-enable: Replace the CGO suffix section above with the conditional logic below
133+ # - name: Set metadata variables
134+ # id: vars
135+ # run: |
136+ # # Base images
137+ # echo "images=ghcr.io/pokt-network/pocketd,ghcr.io/pokt-network/poktrolld" >> $GITHUB_OUTPUT
138+ #
139+ # # CGO suffix and dockerfile selection (matrix-based)
140+ # if [[ "${{ matrix.cgo_variant }}" == "cgo" ]]; then
141+ # echo "cgo_suffix=-cgo" >> $GITHUB_OUTPUT
142+ # echo "dockerfile=Dockerfile.release.cgo" >> $GITHUB_OUTPUT
143+ # else
144+ # echo "cgo_suffix=" >> $GITHUB_OUTPUT
145+ # echo "dockerfile=Dockerfile.release" >> $GITHUB_OUTPUT
146+ # fi
147+ #
148+ # # Event-specific tag suffix
149+ # if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
150+ # echo "tag_suffix=-prod" >> $GITHUB_OUTPUT
151+ # elif [[ "${{ github.ref }}" == "refs/heads/main" && "${{ github.event_name }}" != "workflow_dispatch" ]]; then
152+ # echo "tag_suffix=-main-prod" >> $GITHUB_OUTPUT
153+ # elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
154+ # BRANCH_NAME=${GITHUB_REF#refs/heads/}
155+ # CUSTOM_TAG="${{ github.inputs.custom_tag }}"
156+ # if [[ -n "$CUSTOM_TAG" ]]; then
157+ # echo "tag_suffix=-${BRANCH_NAME}-prod-${CUSTOM_TAG}" >> $GITHUB_OUTPUT
158+ # else
159+ # echo "tag_suffix=-${BRANCH_NAME}-prod" >> $GITHUB_OUTPUT
160+ # fi
161+ # fi
162+
120163 # Extract branch name for workflow_dispatch
121164 - name : Extract branch name
122165 if : github.event_name == 'workflow_dispatch'
0 commit comments