-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (40 loc) · 1.65 KB
/
Copy pathrun_superpermutation.yml
File metadata and controls
48 lines (40 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# GitHub Action to execute the Ring-Cascade Superpermutation Generator
# This workflow triggers only when the specific generator script is modified.
name: Generate Superpermutations
on:
#push:
# branches: [ "main" ]
# paths:
# - 'superpermutation/ring-cascade_superpermutation_generate.py'
pull_request:
branches: [ "main" ]
paths:
- 'superpermutation/ring-cascade_superpermutation_generate.py'
workflow_dispatch:
jobs:
run-generator:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
# The standard output (print statements) will appear in the "Run" log
- name: Execute Generator Script
id: run_script
run: |
echo "### Algorithm Execution Logs" >> $GITHUB_STEP_SUMMARY
echo "Starting Ring-Cascade Permutation Algorithm..." >> $GITHUB_STEP_SUMMARY
# Execute and direct output to both console and summary
python superpermutation/ring-cascade_superpermutation_generate.py | tee -a run_log.txt
# Optional: Format the output into the GitHub Summary page
echo "" >> $GITHUB_STEP_SUMMARY
echo "#### Results Summary" >> $GITHUB_STEP_SUMMARY
echo '```text' >> $GITHUB_STEP_SUMMARY
cat run_log.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- name: Final Status
if: success()
run: echo "The results are displayed above in the Step Summary and Console logs."