COmpendium of RElations – Modulo 6 #147
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 💎 Main Workflow: eQuantum MEC30 | |
| name: COmpendium of RElations – Modulo 6 | |
| on: | |
| #push: | |
| workflow_run: | |
| types: [completed] | |
| workflows: ["pages-build-deployment"] | |
| repository_dispatch: | |
| types: [trigger_action, retry_workflow] | |
| workflow_dispatch: | |
| inputs: | |
| FREQAI_MODEL: | |
| description: 'the model of FreqAI to run' | |
| default: 'false' | |
| required: false | |
| type: string | |
| REMOVE_RUNNER: | |
| description: 'remove runner if is set true' | |
| default: 'false' | |
| required: false | |
| type: string | |
| concurrency: | |
| cancel-in-progress: true | |
| group: ${{ github.workflow }} | |
| permissions: write-all | |
| # 🕸️ Global Environment | |
| env: | |
| REPO_NAME: ${{ github.repository }} | |
| GH_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
| RERUN_RUNNER: ${{ vars.RERUN_RUNNER }} | |
| RUNNER_TITLE: "Google-optimized-instance" | |
| TARGET_REPOSITORY: ${{ vars.TARGET_REPOSITORY }} | |
| jobs: | |
| lexering: | |
| strategy: | |
| max-parallel: 1 | |
| fail-fast: true | |
| matrix: | |
| config: | |
| - { os: ubuntu-latest, jobs_id: 1 } | |
| - { os: macos-latest, jobs_id: 2 } | |
| env: | |
| SCORE: ${{ vars.SCORE || 100 }} | |
| JOBS_ID: ${{ matrix.config.jobs_id }} | |
| PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
| DOC: '${{ vars.TARGET_REPOSITORY }}.wiki' | |
| FREQAI_MODEL: ${{ github.event.inputs.FREQAI_MODEL }} | |
| REMOVE_RUNNER: ${{ github.event.inputs.REMOVE_RUNNER }} | |
| runs-on: ${{ matrix.config.os }} | |
| continue-on-error: ${{ matrix.config.jobs_id != 1 }} | |
| steps: | |
| - name: 📂 Diskspace | |
| if: ${{ runner.os == 'Linux' && env.JOBS_ID == 1 }} | |
| run: | | |
| echo "🧹 Free disk" | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /usr/lib/google-cloud-sdk | |
| docker system prune -af || true | |
| docker builder prune -af || true | |
| echo "⏫ Setting up 100GB tmpfs" | |
| sudo mkdir -p /mnt/extra | |
| sudo mount -t tmpfs -o size=100G tmpfs /mnt/extra | |
| echo "➡️ Syncing workspace" | |
| sudo rsync -a "$GITHUB_WORKSPACE/" /mnt/extra/ | |
| echo "➡️ Switching workspace" | |
| echo "GITHUB_WORKSPACE=/mnt/extra" >> $GITHUB_ENV | |
| echo "GITHUB_WORKSPACE=/mnt/extra" >> $GITHUB_OUTPUT | |
| # optional symlink to avoid tool breakage | |
| sudo rm -rf "$GITHUB_WORKSPACE" | |
| sudo ln -s /mnt/extra "$GITHUB_WORKSPACE" | |
| echo "📌 Workspace successfully expanded." | |
| - name: 📥 Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.ACCESS_TOKEN }} | |
| repository: ${{ env.JOBS_ID != 1 && env.DOC || '' }} | |
| submodules: ${{ env.JOBS_ID != 1 && 'recursive' || false }} | |
| - name: ⚙️ Build Maps | |
| uses: eq19/maps@v8 | |
| id: build-parser | |
| with: | |
| token: ${{ secrets.ACCESS_TOKEN }} | |
| chat_id: ${{ secrets.MESSAGE_API }} | |
| api_key: ${{ secrets.ACCESS_API }} | |
| api_secret: ${{ secrets.ACCESS_KEY }} | |
| pypi_token: ${{ secrets.PYPI_TOKEN }} | |
| bot_token: ${{ secrets.MONITOR_TOKEN }} | |
| logs_token: ${{ secrets.WARNING_TOKEN }} | |
| credentials: ${{ secrets.GCP_CREDENTIALS }} | |
| docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }} | |
| docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
| initiate_pauli_sum: ${{ toJSON(steps.build-parser.outputs) }} | |
| - name: 🪂 Feed Mapping | |
| uses: eq19/feed@v6 | |
| id: feed-mapping | |
| with: | |
| token: ${{ secrets.ACCESS_TOKEN }} | |
| chat_id: ${{ secrets.MESSAGE_API }} | |
| api_key: ${{ secrets.ACCESS_API }} | |
| api_secret: ${{ secrets.ACCESS_KEY }} | |
| pypi_token: ${{ secrets.PYPI_TOKEN }} | |
| live_token: ${{ secrets.LIVE_TOKEN }} | |
| bot_token: ${{ secrets.MONITOR_TOKEN }} | |
| logs_token: ${{ secrets.WARNING_TOKEN }} | |
| credentials: ${{ secrets.GCP_CREDENTIALS }} | |
| docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }} | |
| docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
| initiate_pauli_sum: ${{ toJSON(steps.build-parser.outputs) }} | |
| - name: 🏃♂️ Lexering Runner | |
| uses: eq19/lexer@v4 | |
| id: set-lexering | |
| with: | |
| token: ${{ secrets.ACCESS_TOKEN }} | |
| config: ${{ secrets.CONFIG_JSON }} | |
| credentials: ${{ secrets.GCP_CREDENTIALS }} | |
| docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }} | |
| docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
| initiate_pauli_sum: ${{ toJSON(steps.feed-mapping.outputs) }} | |
| - name: 📋 Generate Outputs | |
| shell: bash | |
| id: gen_outputs | |
| if: ${{ env.JOBS_ID == 2 && env.RERUN_RUNNER == 'true' }} | |
| run: | | |
| output=${{ steps.feed-mapping.outputs.addition || steps.set-lexering.outputs.multiplication }} | |
| bash ${{ github.workspace }}/_user/ft_client/test_client/gcp.sh | |
| echo "output_${id}=${output}" >> "${GITHUB_OUTPUT}" | |
| outputs: | |
| # ♻️ Simulate Gell-Mann Matrices | |
| target: ${{ steps.gen_outputs.outputs.output_1 }} | |
| address: ${{ steps.gen_outputs.outputs.output_2 }} | |
| function: ${{ steps.set-lexering.outputs.function }} | |
| parsering: | |
| strategy: | |
| matrix: | |
| config: | |
| - { os: self-hosted, jobs_id: 3 } | |
| - { os: windows-latest, jobs_id: 4 } | |
| # 💢 Completeness relations | |
| max-parallel: 1 | |
| fail-fast: true | |
| env: | |
| JOBS_ID: ${{ matrix.config.jobs_id }} | |
| IP_ADDRESS: '${{ needs.lexering.outputs.address }}' | |
| PASS: ${{ contains(needs.lexering.result, 'success') }} | |
| ## ✔️ Completeness status | |
| needs: lexering | |
| #if: ${{ env.JOBS_ID == 4 }} | |
| runs-on: ${{ matrix.config.os }} | |
| continue-on-error: ${{ matrix.config.jobs_id == 3 && true || false }} | |
| steps: | |
| - name: 📥 Checkout | |
| uses: actions/checkout@v4 | |
| id: check-out | |
| with: | |
| submodules: recursive | |
| token: ${{ secrets.ACCESS_TOKEN }} | |
| repository: ${{ env.TARGET_REPOSITORY }} | |
| ref: ${{ env.JOBS_ID == 3 && 'gh-source' || 'gh-pages' }} | |
| - name: 🚀 Setup Parser | |
| if: ${{ env.PASS == 'true' }} | |
| uses: eq19/parser@v2 | |
| id: set-parser | |
| with: | |
| token: ${{ secrets.ACCESS_TOKEN }} | |
| chat_id: ${{ secrets.MESSAGE_API }} | |
| api_key: ${{ secrets.ACCESS_API }} | |
| api_secret: ${{ secrets.ACCESS_KEY }} | |
| pypi_token: ${{ secrets.PYPI_TOKEN }} | |
| live_token: ${{ secrets.LIVE_TOKEN }} | |
| bot_token: ${{ secrets.MONITOR_TOKEN }} | |
| logs_token: ${{ secrets.WARNING_TOKEN }} | |
| credentials: ${{ secrets.GCP_CREDENTIALS }} | |
| pauli_sum: ${{ needs.lexering.outputs.function }} | |
| failure_status: ${{ contains(steps.check-out.conclusion, 'failure') || | |
| (env.JOBS_ID == 4 && contains(needs.lexering.result, 'failure')) }} | |
| - name: 🌀 Evaluate Syntax | |
| if: ${{ env.PASS == 'true' }} | |
| uses: eq19/syntax@v2 | |
| id: eval-syntax | |
| with: | |
| token: ${{ secrets.ACCESS_TOKEN }} | |
| api_key: ${{ secrets.ACCESS_API }} | |
| api_secret: ${{ secrets.ACCESS_KEY }} | |
| credentials: ${{ secrets.GCP_CREDENTIALS }} | |
| pauli_sum: ${{ toJSON(steps.set-parser.outputs) }} | |
| failure_status: ${{ contains(steps.set-parser.conclusion, 'failure') || | |
| (env.JOBS_ID == 4 && contains(needs.lexering.result, 'failure')) }} | |
| - name: ⚧️ Set Grammar Rules | |
| uses: eq19/grammar@v1 | |
| id: grammar-rules | |
| if: always() | |
| with: | |
| token: ${{ secrets.ACCESS_TOKEN }} | |
| credentials: ${{ secrets.GCP_CREDENTIALS }} | |
| pauli_sum: ${{ toJSON(steps.eval-syntax.outputs) }} | |
| failure_status: ${{ contains(steps.eval-syntax.conclusion, 'failure') || | |
| (env.JOBS_ID == 4 && contains(needs.lexering.result, 'failure')) }} | |
| #manual_force_cancel: gh run cancel 19411342256 --repo eq19/grammar --force |