Skip to content

Commit fc58def

Browse files
committed
Merge branch 'main' into starkpay_setup
2 parents a115420 + 29fe1b7 commit fc58def

File tree

20 files changed

+1117
-202
lines changed

20 files changed

+1117
-202
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/github-workflow.json
3+
name: Manual Docker Image Build
4+
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
build-madara:
9+
description: "Build Madara image"
10+
required: true
11+
type: boolean
12+
default: true
13+
build-orchestrator:
14+
description: "Build Orchestrator image"
15+
required: true
16+
type: boolean
17+
default: true
18+
build-bootstrapper:
19+
description: "Build Bootstrapper image"
20+
required: true
21+
type: boolean
22+
default: true
23+
24+
jobs:
25+
build-and-publish-madara:
26+
if: ${{ inputs.build-madara }}
27+
uses: ./.github/workflows/task-build-manual-and-publish.yml
28+
with:
29+
image-name: madara
30+
image-file: ./madara/Dockerfile
31+
permissions:
32+
contents: read
33+
packages: write
34+
attestations: write
35+
id-token: write
36+
secrets: inherit
37+
38+
build-and-publish-orchestrator:
39+
if: ${{ inputs.build-orchestrator }}
40+
uses: ./.github/workflows/task-build-manual-and-publish.yml
41+
with:
42+
image-name: orchestrator
43+
image-file: ./orchestrator/Dockerfile
44+
permissions:
45+
contents: read
46+
packages: write
47+
attestations: write
48+
id-token: write
49+
secrets: inherit
50+
51+
build-and-publish-bootstrapper:
52+
if: ${{ inputs.build-bootstrapper }}
53+
uses: ./.github/workflows/task-build-manual-and-publish.yml
54+
with:
55+
image-name: bootstrapper
56+
image-file: ./bootstrapper/Dockerfile
57+
permissions:
58+
contents: read
59+
packages: write
60+
attestations: write
61+
id-token: write
62+
secrets: inherit

.github/workflows/nightly-run.yml

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
---
2+
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/github-workflow.json
3+
name: Nightly Run
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: "0 0 * * *"
9+
10+
jobs:
11+
# ========================================================================= #
12+
# SCHEDULE GATE #
13+
# ========================================================================= #
14+
15+
check-merged-today:
16+
name: Check commits merged in previous UTC day
17+
runs-on: ubuntu-latest
18+
outputs:
19+
should_run: ${{ steps.check.outputs.should_run }}
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- name: Check commits on main in previous UTC day
26+
id: check
27+
shell: bash
28+
run: |
29+
set -euo pipefail
30+
SINCE="$(date -u -d 'yesterday 00:00' +%Y-%m-%dT%H:%M:%SZ)"
31+
UNTIL="$(date -u -d 'today 00:00' +%Y-%m-%dT%H:%M:%SZ)"
32+
git fetch origin main --prune
33+
COUNT="$(git rev-list --count --since="$SINCE" --until="$UNTIL" origin/main)"
34+
if [ "$COUNT" -gt 0 ]; then
35+
echo "should_run=true" >> "$GITHUB_OUTPUT"
36+
else
37+
echo "should_run=false" >> "$GITHUB_OUTPUT"
38+
fi
39+
# ========================================================================= #
40+
# NIGHTLY RELEASE #
41+
# ========================================================================= #
42+
43+
build-nightly-and-publish-madara:
44+
uses: ./.github/workflows/task-build-nightly-and-publish.yml
45+
with:
46+
image-name: madara
47+
image-file: ./madara/Dockerfile
48+
needs: [test-end-to-end]
49+
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
50+
permissions:
51+
contents: read
52+
packages: write
53+
attestations: write
54+
id-token: write
55+
secrets: inherit
56+
57+
# test-hive:
58+
# needs: [build-nightly]
59+
# uses: ./.github/workflows/task-test-hive.yml
60+
# with:
61+
# nightly-sha: ${{ needs.build-nightly.outputs.nightly-sha }}
62+
# secrets: inherit
63+
64+
build-nightly-and-publish-orchestrator:
65+
uses: ./.github/workflows/task-build-nightly-and-publish.yml
66+
with:
67+
image-name: orchestrator
68+
image-file: ./orchestrator/Dockerfile
69+
needs: [test-end-to-end]
70+
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
71+
permissions:
72+
contents: read
73+
packages: write
74+
attestations: write
75+
id-token: write
76+
secrets: inherit
77+
78+
build-nightly-and-publish-bootstrapper:
79+
uses: ./.github/workflows/task-build-nightly-and-publish.yml
80+
with:
81+
image-name: bootstrapper
82+
image-file: ./bootstrapper/Dockerfile
83+
needs: [test-end-to-end]
84+
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
85+
permissions:
86+
contents: read
87+
packages: write
88+
attestations: write
89+
id-token: write
90+
secrets: inherit
91+
92+
# ========================================================================= #
93+
# MERGE QUEUE #
94+
# ========================================================================= #
95+
96+
# Run coverage tests (Madara)
97+
test-madara:
98+
uses: ./.github/workflows/task-do-nothing-test-madara.yml
99+
100+
# Run coverage tests (Orchestrator)
101+
test-orchestrator:
102+
uses: ./.github/workflows/task-do-nothing-test-orchestrator.yml
103+
104+
# Run coverage tests (Bootstrapper)
105+
test-bootstrapper:
106+
uses: ./.github/workflows/task-do-nothing-test-bootstrapper.yml
107+
108+
# Run JavaScript tests
109+
test-js:
110+
uses: ./.github/workflows/task-do-nothing-test-js.yml
111+
112+
# Run CLI tests
113+
test-cli:
114+
uses: ./.github/workflows/task-do-nothing-test-cli.yml
115+
116+
# ========================================================================= #
117+
# E2E Test #
118+
# ========================================================================= #
119+
120+
# Build Madara binary
121+
build-madara:
122+
uses: ./.github/workflows/task-build-madara.yml
123+
needs: [check-merged-today]
124+
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
125+
secrets: inherit
126+
127+
# Build Orchestrator binary
128+
build-orchestrator:
129+
uses: ./.github/workflows/task-build-orchestrator.yml
130+
needs: [check-merged-today]
131+
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
132+
secrets: inherit
133+
134+
# Build Bootstrapper binary
135+
build-bootstrapper:
136+
uses: ./.github/workflows/task-build-bootstrapper.yml
137+
needs: [check-merged-today]
138+
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
139+
secrets: inherit
140+
141+
# End-to-end tests
142+
test-end-to-end:
143+
needs: [build-madara, build-orchestrator, build-bootstrapper]
144+
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
145+
uses: ./.github/workflows/task-test-end-to-end.yml
146+
with:
147+
madara-binary-hash: ${{ needs.build-madara.outputs.madara-binary-hash }}
148+
orchestrator-binary-hash: ${{ needs.build-orchestrator.outputs.orchestrator-binary-hash }}
149+
bootstrapper-binary-hash: ${{ needs.build-bootstrapper.outputs.bootstrapper-binary-hash }}
150+
cairo-artifacts-hash: ${{ needs.build-madara.outputs.cairo-artifacts-hash }}
151+
secrets: inherit

.github/workflows/pull-request-merge.yml

Lines changed: 10 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -4,91 +4,27 @@ name: Workflow - Pull Request Main (merge)
44

55
on:
66
workflow_dispatch:
7-
schedule:
8-
- cron: "0 0 * * *"
7+
merge_group:
98

109
jobs:
1110
# ========================================================================= #
12-
# SCHEDULE GATE #
13-
# ========================================================================= #
14-
15-
check-merged-today:
16-
name: Check commits merged in previous UTC day
17-
runs-on: ubuntu-latest
18-
outputs:
19-
should_run: ${{ steps.check.outputs.should_run }}
20-
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v4
23-
with:
24-
fetch-depth: 0
25-
- name: Check commits on main in previous UTC day
26-
id: check
27-
shell: bash
28-
run: |
29-
set -euo pipefail
30-
SINCE="$(date -u -d 'yesterday 00:00' +%Y-%m-%dT%H:%M:%SZ)"
31-
UNTIL="$(date -u -d 'today 00:00' +%Y-%m-%dT%H:%M:%SZ)"
32-
git fetch origin main --prune
33-
COUNT="$(git rev-list --count --since="$SINCE" --until="$UNTIL" origin/main)"
34-
if [ "$COUNT" -gt 0 ]; then
35-
echo "should_run=true" >> "$GITHUB_OUTPUT"
36-
else
37-
echo "should_run=false" >> "$GITHUB_OUTPUT"
38-
fi
39-
# ========================================================================= #
4011
# NIGHTLY RELEASE #
4112
# ========================================================================= #
4213

4314
build-nightly-and-publish-madara:
44-
uses: ./.github/workflows/task-build-nightly-and-publish.yml
45-
with:
46-
image-name: madara
47-
image-file: ./madara/Dockerfile
48-
needs: [check-merged-today]
49-
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
50-
permissions:
51-
contents: read
52-
packages: write
53-
attestations: write
54-
id-token: write
55-
secrets: inherit
15+
if: github.event.pull_request.draft == false
16+
uses: ./.github/workflows/task-do-nothing-build-nightly-and-publish.yml
5617

5718
# test-hive:
58-
# needs: [build-nightly]
59-
# uses: ./.github/workflows/task-test-hive.yml
60-
# with:
61-
# nightly-sha: ${{ needs.build-nightly.outputs.nightly-sha }}
62-
# secrets: inherit
19+
# uses: ./.github/workflows/task-do-nothing-test-hive.yml
6320

6421
build-nightly-and-publish-orchestrator:
65-
uses: ./.github/workflows/task-build-nightly-and-publish.yml
66-
with:
67-
image-name: orchestrator
68-
image-file: ./orchestrator/Dockerfile
69-
needs: [check-merged-today]
70-
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
71-
permissions:
72-
contents: read
73-
packages: write
74-
attestations: write
75-
id-token: write
76-
secrets: inherit
22+
if: github.event.pull_request.draft == false
23+
uses: ./.github/workflows/task-do-nothing-build-nightly-and-publish.yml
7724

78-
# Deprecating bootstrapper V1
7925
build-nightly-and-publish-bootstrapper:
80-
uses: ./.github/workflows/task-build-nightly-and-publish.yml
81-
with:
82-
image-name: bootstrapper
83-
image-file: ./bootstrapper/Dockerfile
84-
needs: [check-merged-today]
85-
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
86-
permissions:
87-
contents: read
88-
packages: write
89-
attestations: write
90-
id-token: write
91-
secrets: inherit
26+
if: github.event.pull_request.draft == false
27+
uses: ./.github/workflows/task-do-nothing-build-nightly-and-publish.yml
9228

9329
# ========================================================================= #
9430
# MERGE QUEUE #
@@ -118,36 +54,6 @@ jobs:
11854
# E2E Test #
11955
# ========================================================================= #
12056

121-
# Build Madara binary
122-
build-madara:
123-
uses: ./.github/workflows/task-build-madara.yml
124-
needs: [check-merged-today]
125-
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
126-
secrets: inherit
127-
128-
# Build Orchestrator binary
129-
build-orchestrator:
130-
uses: ./.github/workflows/task-build-orchestrator.yml
131-
needs: [check-merged-today]
132-
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
133-
secrets: inherit
134-
135-
# Build Bootstrapper binary
136-
build-bootstrapper:
137-
uses: ./.github/workflows/task-build-bootstrapper.yml
138-
needs: [check-merged-today]
139-
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
140-
secrets: inherit
141-
142-
# End-to-end tests
14357
test-end-to-end:
144-
needs:
145-
[check-merged-today, build-madara, build-orchestrator, build-bootstrapper]
146-
if: github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
147-
uses: ./.github/workflows/task-test-end-to-end.yml
148-
with:
149-
madara-binary-hash: ${{ needs.build-madara.outputs.madara-binary-hash }}
150-
orchestrator-binary-hash: ${{ needs.build-orchestrator.outputs.orchestrator-binary-hash }}
151-
bootstrapper-binary-hash: ${{ needs.build-bootstrapper.outputs.bootstrapper-binary-hash }}
152-
cairo-artifacts-hash: ${{ needs.build-madara.outputs.cairo-artifacts-hash }}
153-
secrets: inherit
58+
if: github.event.pull_request.draft == false
59+
uses: ./.github/workflows/task-do-nothing-test-end-to-end.yml

0 commit comments

Comments
 (0)