Skip to content

Commit de439df

Browse files
committed
Update file
1 parent ccdc804 commit de439df

File tree

1 file changed

+174
-0
lines changed

1 file changed

+174
-0
lines changed

.github/workflows/main.yml

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
# 💎 Main Workflow: eQuantum MEC30
2+
name: COmpendium of RElations – Modulo 6
3+
4+
on:
5+
push:
6+
workflow_run:
7+
types: [completed]
8+
workflows: ["pages-build-deployment"]
9+
repository_dispatch:
10+
types: [trigger_action, retry_workflow]
11+
12+
# 🕸️ Allow concurrent
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
17+
# ⚠️ Set token permissions
18+
permissions: write-all
19+
20+
# 🕸️ Global Environment
21+
env:
22+
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
23+
RUNNER_TITLE: "Google-optimized-instance"
24+
TARGET_REPOSITORY: ${{ vars.TARGET_REPOSITORY }}
25+
26+
jobs:
27+
lexering:
28+
strategy:
29+
max-parallel: 1
30+
fail-fast: true
31+
matrix:
32+
config:
33+
- { os: ubuntu-latest, jobs_id: 1 }
34+
- { os: macos-latest, jobs_id: 2 }
35+
env:
36+
JOBS_ID: ${{ matrix.config.jobs_id }}
37+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
38+
DOC: '${{ vars.TARGET_REPOSITORY }}.wiki'
39+
40+
# 🔧 Commutation relations
41+
runs-on: ${{ matrix.config.os }}
42+
continue-on-error: ${{ matrix.config.jobs_id != 1 && false || true }}
43+
44+
steps:
45+
- name: 📂 Checkout
46+
uses: actions/checkout@v4
47+
with:
48+
submodules: recursive
49+
token: ${{ secrets.ACCESS_TOKEN }}
50+
repository: ${{ env.JOBS_ID != 1 && env.DOC || '' }}
51+
52+
- name: ⚙️ Build Maps
53+
uses: eq19/maps@v8
54+
id: build-parser
55+
with:
56+
token: ${{ secrets.ACCESS_TOKEN }}
57+
chat_id: ${{ secrets.MESSAGE_API }}
58+
api_key: ${{ secrets.ACCESS_API }}
59+
api_secret: ${{ secrets.ACCESS_KEY }}
60+
pypi_token: ${{ secrets.PYPI_TOKEN }}
61+
bot_token: ${{ secrets.MONITOR_TOKEN }}
62+
logs_token: ${{ secrets.WARNING_TOKEN }}
63+
credentials: ${{ secrets.GCP_CREDENTIALS }}
64+
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
65+
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}
66+
initiate_pauli_sum: ${{ toJSON(steps.build-parser.outputs) }}
67+
68+
- name: 🪂 Feed Mapping
69+
uses: eq19/feed@v6
70+
id: feed-mapping
71+
with:
72+
token: ${{ secrets.ACCESS_TOKEN }}
73+
chat_id: ${{ secrets.MESSAGE_API }}
74+
api_key: ${{ secrets.ACCESS_API }}
75+
api_secret: ${{ secrets.ACCESS_KEY }}
76+
pypi_token: ${{ secrets.PYPI_TOKEN }}
77+
bot_token: ${{ secrets.MONITOR_TOKEN }}
78+
logs_token: ${{ secrets.WARNING_TOKEN }}
79+
credentials: ${{ secrets.GCP_CREDENTIALS }}
80+
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
81+
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}
82+
initiate_pauli_sum: ${{ toJSON(steps.build-parser.outputs) }}
83+
84+
- name: 🏃‍♂️ Lexering Runner
85+
uses: eq19/lexer@v4
86+
id: set-lexering
87+
with:
88+
token: ${{ secrets.ACCESS_TOKEN }}
89+
config: ${{ secrets.CONFIG_JSON }}
90+
credentials: ${{ secrets.GCP_CREDENTIALS }}
91+
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
92+
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}
93+
initiate_pauli_sum: ${{ toJSON(steps.feed-mapping.outputs) }}
94+
95+
- name: 📋 Generate Outputs
96+
id: gen_outputs
97+
shell: bash
98+
run: |
99+
output=${{ env.JOBS_ID == 1 &&
100+
steps.feed-mapping.outputs.addition ||
101+
steps.set-lexering.outputs.multiplication }}
102+
echo "output_${id}=${output}" >> "${GITHUB_OUTPUT}"
103+
104+
outputs:
105+
# ♻️ Simulate Gell-Mann Matrices
106+
target: ${{ steps.gen_outputs.outputs.output_1 }}
107+
address: ${{ steps.gen_outputs.outputs.output_2 }}
108+
function: ${{ steps.set-lexering.outputs.function }}
109+
110+
parsering:
111+
strategy:
112+
matrix:
113+
config:
114+
- { os: self-hosted, jobs_id: 3 }
115+
- { os: windows-latest, jobs_id: 4 }
116+
117+
# 💢 Completeness relations
118+
max-parallel: 1
119+
fail-fast: true
120+
121+
env:
122+
JOBS_ID: ${{ matrix.config.jobs_id }}
123+
IP_ADDRESS: '${{ needs.lexering.outputs.address }}'
124+
PASS: ${{ contains(needs.lexering.result, 'success') }}
125+
126+
## ✔️ Completeness status
127+
needs: lexering
128+
runs-on: ${{ matrix.config.os }}
129+
#if: ${{ (needs.lexering.result == 'success') }}
130+
continue-on-error: ${{ matrix.config.jobs_id == 3 && true || false }}
131+
132+
steps:
133+
- name: 📂 Checkout
134+
uses: actions/checkout@v4
135+
with:
136+
submodules: recursive
137+
token: ${{ secrets.ACCESS_TOKEN }}
138+
repository: ${{ env.TARGET_REPOSITORY }}
139+
ref: ${{ env.JOBS_ID == 3 && 'gh-source' || 'gh-pages' }}
140+
141+
- name: 🚀 Setup Parser
142+
if: ${{ env.PASS == 'true' }}
143+
uses: eq19/parser@v2
144+
id: set-parser
145+
with:
146+
token: ${{ secrets.ACCESS_TOKEN }}
147+
credentials: ${{ secrets.GCP_CREDENTIALS }}
148+
pauli_sum: ${{ needs.lexering.outputs.function }}
149+
failure_status: ${{ contains(steps.*.conclusion, 'failure') ||
150+
(env.JOBS_ID == 4 && contains(needs.*.result, 'failure')) }}
151+
152+
- name: 🌀 Evaluate Syntax
153+
if: ${{ env.PASS == 'true' }}
154+
uses: eq19/syntax@v2
155+
id: eval-syntax
156+
with:
157+
token: ${{ secrets.ACCESS_TOKEN }}
158+
api_key: ${{ secrets.ACCESS_API }}
159+
api_secret: ${{ secrets.ACCESS_KEY }}
160+
credentials: ${{ secrets.GCP_CREDENTIALS }}
161+
pauli_sum: ${{ toJSON(steps.set-parser.outputs) }}
162+
failure_status: ${{ contains(steps.*.conclusion, 'failure') ||
163+
(env.JOBS_ID == 4 && contains(needs.*.result, 'failure')) }}
164+
165+
- name: ⚧️ Set Grammar Rules
166+
uses: eq19/grammar@v1
167+
id: grammar-rules
168+
if: always()
169+
with:
170+
token: ${{ secrets.ACCESS_TOKEN }}
171+
credentials: ${{ secrets.GCP_CREDENTIALS }}
172+
pauli_sum: ${{ toJSON(steps.eval-syntax.outputs) }}
173+
failure_status: ${{ contains(steps.*.conclusion, 'failure') ||
174+
(env.JOBS_ID == 4 && contains(needs.*.result, 'failure')) }}

0 commit comments

Comments
 (0)