Skip to content

Commit a4d4b65

Browse files
committed
further op plus make gen timing debug
1 parent 8bf1035 commit a4d4b65

File tree

2 files changed

+94
-70
lines changed

2 files changed

+94
-70
lines changed

.github/workflows/ci.yml

Lines changed: 92 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -44,67 +44,9 @@ jobs:
4444
wait $FMT_PID || exit 1
4545
wait $LINT_PID || exit 1
4646
47-
# Setup FFI cache for ubuntu-latest jobs
48-
setup-build-env:
49-
runs-on: ubuntu-latest
50-
steps:
51-
- uses: actions/checkout@v4
52-
with:
53-
submodules: recursive
54-
55-
- name: Setup build environment
56-
uses: ./.github/actions/setup-build-env
57-
with:
58-
go-version: ${{ env.GO_VERSION }}
59-
60-
# Self-hosted setup - proof params and FFI cache only
61-
setup-self-hosted:
62-
runs-on: [self-hosted, docker]
63-
steps:
64-
# Check if proof params exist locally (self-hosted runners persist files)
65-
- name: Check local proof parameters
66-
id: local-params
67-
run: |
68-
PARAMS_DIR="/var/tmp/filecoin-proof-parameters"
69-
if [ -d "$PARAMS_DIR" ] && [ "$(ls -A $PARAMS_DIR 2>/dev/null)" ]; then
70-
echo "exists=true" >> $GITHUB_OUTPUT
71-
else
72-
echo "exists=false" >> $GITHUB_OUTPUT
73-
fi
74-
75-
- name: Cache proof parameters
76-
if: steps.local-params.outputs.exists != 'true'
77-
id: cache-params
78-
uses: actions/cache/restore@v4
79-
with:
80-
path: /var/tmp/filecoin-proof-parameters
81-
key: proof-params-8388608
82-
restore-keys: proof-params-
83-
84-
- name: Save proof parameters cache
85-
if: steps.local-params.outputs.exists != 'true' && steps.cache-params.outputs.cache-hit != 'true' && github.ref == 'refs/heads/main'
86-
uses: actions/cache/save@v4
87-
with:
88-
path: /var/tmp/filecoin-proof-parameters
89-
key: proof-params-8388608
90-
91-
- name: Fetch parameters
92-
if: steps.local-params.outputs.exists != 'true' && steps.cache-params.outputs.cache-hit != 'true'
93-
run: lotus fetch-params 8388608
94-
95-
- uses: actions/checkout@v4
96-
with:
97-
submodules: recursive
98-
99-
- name: Setup build environment
100-
uses: ./.github/actions/setup-build-env
101-
with:
102-
go-version: ${{ env.GO_VERSION }}
103-
104-
# Lint - runs early, fast feedback
47+
# Lint - runs immediately, no dependencies
10548
lint:
10649
runs-on: ubuntu-latest
107-
needs: [setup-build-env]
10850
steps:
10951
- uses: actions/checkout@v4
11052
with:
@@ -120,10 +62,9 @@ jobs:
12062
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.4.0
12163
golangci-lint run -v --timeout 15m --concurrency 4
12264
123-
# Single build job - just verify it compiles
65+
# Build variants - run in parallel, no dependencies
12466
build:
12567
runs-on: ubuntu-latest
126-
needs: [setup-build-env]
12768
strategy:
12869
fail-fast: false
12970
matrix:
@@ -141,10 +82,9 @@ jobs:
14182
- name: Build ${{ matrix.variant }}
14283
run: make ${{ matrix.variant }}
14384

144-
# Unit tests - no database needed
85+
# Unit tests - no database needed, runs immediately on self-hosted
14586
test-unit:
14687
runs-on: [self-hosted, docker]
147-
needs: [setup-self-hosted]
14888
steps:
14989
- uses: actions/checkout@v4
15090
with:
@@ -161,10 +101,41 @@ jobs:
161101
# Integration tests - parallel tests (use t.Parallel())
162102
test-itest-parallel:
163103
runs-on: [self-hosted, docker]
164-
needs: [setup-self-hosted]
165104
env:
166105
YB_CONTAINER: yugabyte-parallel-${{ github.run_id }}
167106
steps:
107+
- name: Check local proof parameters
108+
id: local-params
109+
run: |
110+
PARAMS_DIR="/var/tmp/filecoin-proof-parameters"
111+
if [ -d "$PARAMS_DIR" ] && [ "$(ls -A $PARAMS_DIR 2>/dev/null)" ]; then
112+
echo "exists=true" >> $GITHUB_OUTPUT
113+
else
114+
echo "exists=false" >> $GITHUB_OUTPUT
115+
fi
116+
117+
- name: Restore proof parameters from cache
118+
if: steps.local-params.outputs.exists != 'true'
119+
id: cache-params
120+
uses: actions/cache/restore@v4
121+
with:
122+
path: /var/tmp/filecoin-proof-parameters
123+
key: proof-params-2k-v1
124+
restore-keys: proof-params-
125+
126+
- name: Fetch proof parameters
127+
if: steps.local-params.outputs.exists != 'true' && steps.cache-params.outputs.cache-hit != 'true'
128+
run: |
129+
echo "Fetching proof parameters (cache miss)..."
130+
lotus fetch-params 8388608
131+
132+
- name: Save proof parameters to cache
133+
if: steps.local-params.outputs.exists != 'true' && steps.cache-params.outputs.cache-hit != 'true' && github.ref == 'refs/heads/main'
134+
uses: actions/cache/save@v4
135+
with:
136+
path: /var/tmp/filecoin-proof-parameters
137+
key: proof-params-2k-v1
138+
168139
- uses: actions/checkout@v4
169140
with:
170141
submodules: recursive
@@ -213,10 +184,41 @@ jobs:
213184
# Integration tests - serial tests (modify global state, cannot use t.Parallel())
214185
test-itest-serial:
215186
runs-on: [self-hosted, docker]
216-
needs: [setup-self-hosted]
217187
env:
218188
YB_CONTAINER: yugabyte-serial-${{ github.run_id }}
219189
steps:
190+
- name: Check local proof parameters
191+
id: local-params
192+
run: |
193+
PARAMS_DIR="/var/tmp/filecoin-proof-parameters"
194+
if [ -d "$PARAMS_DIR" ] && [ "$(ls -A $PARAMS_DIR 2>/dev/null)" ]; then
195+
echo "exists=true" >> $GITHUB_OUTPUT
196+
else
197+
echo "exists=false" >> $GITHUB_OUTPUT
198+
fi
199+
200+
- name: Restore proof parameters from cache
201+
if: steps.local-params.outputs.exists != 'true'
202+
id: cache-params
203+
uses: actions/cache/restore@v4
204+
with:
205+
path: /var/tmp/filecoin-proof-parameters
206+
key: proof-params-2k-v1
207+
restore-keys: proof-params-
208+
209+
- name: Fetch proof parameters
210+
if: steps.local-params.outputs.exists != 'true' && steps.cache-params.outputs.cache-hit != 'true'
211+
run: |
212+
echo "Fetching proof parameters (cache miss)..."
213+
lotus fetch-params 8388608
214+
215+
- name: Save proof parameters to cache
216+
if: steps.local-params.outputs.exists != 'true' && steps.cache-params.outputs.cache-hit != 'true' && github.ref == 'refs/heads/main'
217+
uses: actions/cache/save@v4
218+
with:
219+
path: /var/tmp/filecoin-proof-parameters
220+
key: proof-params-2k-v1
221+
220222
- uses: actions/checkout@v4
221223
with:
222224
submodules: recursive
@@ -262,10 +264,9 @@ jobs:
262264
if: always()
263265
run: docker stop $YB_CONTAINER 2>/dev/null || true
264266

265-
# Gen check
267+
# Gen check - verify generated code is up to date
266268
gen-check:
267269
runs-on: ubuntu-latest
268-
needs: [setup-build-env]
269270
steps:
270271
- uses: actions/checkout@v4
271272
with:
@@ -276,13 +277,35 @@ jobs:
276277
with:
277278
go-version: ${{ env.GO_VERSION }}
278279

279-
- name: Install Go tools and generate
280+
- name: Install Go tools
280281
run: |
281282
go install golang.org/x/tools/cmd/goimports &
282283
go install github.com/hannahhoward/cbor-gen-for &
283284
go install github.com/swaggo/swag/cmd/swag &
284285
wait
285-
make gen
286+
287+
- name: api-gen
288+
run: make api-gen
289+
290+
- name: go-generate
291+
run: make go-generate
292+
293+
- name: cfgdoc-gen
294+
run: make cfgdoc-gen
295+
296+
- name: docsgen (md + openrpc)
297+
run: make docsgen
298+
299+
- name: marketgen
300+
run: make marketgen
301+
302+
- name: docsgen-cli (builds curio + sptool)
303+
run: make docsgen-cli
304+
305+
- name: fiximports + go mod tidy
306+
run: |
307+
go run ./scripts/fiximports
308+
go mod tidy
286309
287310
- name: Check for changes
288311
run: |

itests/serial/sql_idempotent_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/yugabyte/pgx/v5/pgxpool"
1212

1313
"github.com/filecoin-project/curio/harmony/harmonydb"
14+
"github.com/filecoin-project/curio/harmony/harmonydb/testutil"
1415
)
1516

1617
// TestSQLIdempotent tests that the SQL DDL files are idempotent.
@@ -28,7 +29,7 @@ func TestSQLIdempotent(t *testing.T) {
2829
}
2930
}
3031

31-
testID := harmonydb.ITestNewID()
32+
testID := testutil.SetupTestDB(t)
3233
cdb, err := harmonydb.NewFromConfigWithITestID(t, testID)
3334
require.NoError(t, err)
3435

0 commit comments

Comments
 (0)