Skip to content

Commit 87c52de

Browse files
committed
Update file
1 parent d8ea0da commit 87c52de

1 file changed

Lines changed: 168 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
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+
credentials: ${{ secrets.GCP_CREDENTIALS }}
58+
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
59+
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}
60+
initiate_pauli_sum: ${{ toJSON(steps.set-lexering.outputs) }}
61+
62+
- name: 🪂 Feed Mapping
63+
uses: eq19/feed@v6
64+
id: feed-mapping
65+
with:
66+
token: ${{ secrets.ACCESS_TOKEN }}
67+
chat_id: ${{ secrets.MESSAGE_API }}
68+
api_key: ${{ secrets.ACCESS_API }}
69+
api_secret: ${{ secrets.ACCESS_KEY }}
70+
pypi_token: ${{ secrets.PYPI_TOKEN }}
71+
bot_token: ${{ secrets.MONITOR_TOKEN }}
72+
logs_token: ${{ secrets.WARNING_TOKEN }}
73+
credentials: ${{ secrets.GCP_CREDENTIALS }}
74+
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
75+
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}
76+
initiate_pauli_sum: ${{ toJSON(steps.build-parser.outputs) }}
77+
78+
- name: 🏃‍♂️ Lexering Runner
79+
uses: eq19/lexer@v4
80+
id: set-lexering
81+
with:
82+
token: ${{ secrets.ACCESS_TOKEN }}
83+
config: ${{ secrets.CONFIG_JSON }}
84+
credentials: ${{ secrets.GCP_CREDENTIALS }}
85+
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
86+
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}
87+
initiate_pauli_sum: ${{ toJSON(steps.feed-mapping.outputs) }}
88+
89+
- name: 📋 Generate Outputs
90+
id: gen_outputs
91+
shell: bash
92+
run: |
93+
output=${{ env.JOBS_ID == 1 &&
94+
steps.feed-mapping.outputs.addition ||
95+
steps.set-lexering.outputs.multiplication }}
96+
echo "output_${id}=${output}" >> "${GITHUB_OUTPUT}"
97+
98+
outputs:
99+
# ♻️ Simulate Gell-Mann Matrices
100+
target: ${{ steps.gen_outputs.outputs.output_1 }}
101+
address: ${{ steps.gen_outputs.outputs.output_2 }}
102+
function: ${{ steps.set-lexering.outputs.function }}
103+
104+
parsering:
105+
strategy:
106+
matrix:
107+
config:
108+
- { os: self-hosted, jobs_id: 3 }
109+
- { os: windows-latest, jobs_id: 4 }
110+
111+
# 💢 Completeness relations
112+
max-parallel: 1
113+
fail-fast: true
114+
115+
env:
116+
JOBS_ID: ${{ matrix.config.jobs_id }}
117+
IP_ADDRESS: '${{ needs.lexering.outputs.address }}'
118+
PASS: ${{ contains(needs.lexering.result, 'success') }}
119+
120+
## ✔️ Completeness status
121+
needs: lexering
122+
runs-on: ${{ matrix.config.os }}
123+
#if: ${{ (needs.lexering.result == 'success') }}
124+
continue-on-error: ${{ matrix.config.jobs_id == 3 && true || false }}
125+
126+
steps:
127+
- name: 📂 Checkout
128+
uses: actions/checkout@v4
129+
with:
130+
submodules: recursive
131+
token: ${{ secrets.ACCESS_TOKEN }}
132+
repository: ${{ env.TARGET_REPOSITORY }}
133+
ref: ${{ env.JOBS_ID == 3 && 'gh-source' || 'gh-pages' }}
134+
135+
- name: 🚀 Setup Parser
136+
if: ${{ env.PASS == 'true' }}
137+
uses: eq19/parser@v2
138+
id: set-parser
139+
with:
140+
token: ${{ secrets.ACCESS_TOKEN }}
141+
credentials: ${{ secrets.GCP_CREDENTIALS }}
142+
pauli_sum: ${{ needs.lexering.outputs.function }}
143+
failure_status: ${{ contains(steps.*.conclusion, 'failure') ||
144+
(env.JOBS_ID == 4 && contains(needs.*.result, 'failure')) }}
145+
146+
- name: 🌀 Evaluate Syntax
147+
if: ${{ env.PASS == 'true' }}
148+
uses: eq19/syntax@v2
149+
id: eval-syntax
150+
with:
151+
token: ${{ secrets.ACCESS_TOKEN }}
152+
api_key: ${{ secrets.ACCESS_API }}
153+
api_secret: ${{ secrets.ACCESS_KEY }}
154+
credentials: ${{ secrets.GCP_CREDENTIALS }}
155+
pauli_sum: ${{ toJSON(steps.set-parser.outputs) }}
156+
failure_status: ${{ contains(steps.*.conclusion, 'failure') ||
157+
(env.JOBS_ID == 4 && contains(needs.*.result, 'failure')) }}
158+
159+
- name: ⚧️ Set Grammar Rules
160+
uses: eq19/grammar@v1
161+
id: grammar-rules
162+
if: always()
163+
with:
164+
token: ${{ secrets.ACCESS_TOKEN }}
165+
credentials: ${{ secrets.GCP_CREDENTIALS }}
166+
pauli_sum: ${{ toJSON(steps.eval-syntax.outputs) }}
167+
failure_status: ${{ contains(steps.*.conclusion, 'failure') ||
168+
(env.JOBS_ID == 4 && contains(needs.*.result, 'failure')) }}

0 commit comments

Comments
 (0)