Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
CrysoK committed Sep 2, 2024
0 parents commit 57cd551
Show file tree
Hide file tree
Showing 100 changed files with 22,124 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build-windows
run-name: Compilando para Windows

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_call:

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check cache
id: cache
uses: actions/cache/restore@v4
with:
path: aleph.exe
key: aleph-${{ hashFiles('src/**/*.[chyl]', 'Makefile') }}

- name: Setup MSYS2
if: steps.cache.outputs.cache-hit != 'true'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: "mingw-w64-ucrt-x86_64-gcc make bison flex"

- name: Build
if: steps.cache.outputs.cache-hit != 'true'
shell: msys2 {0}
run: make

- name: Cache binary
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: aleph.exe
key: aleph-${{ hashFiles('src/**/*.[chyl]', 'Makefile') }}
59 changes: 59 additions & 0 deletions .github/workflows/delete-runs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: delete-runs
run-name: Eliminando ejecuciones de workflows

on:
workflow_dispatch:
inputs:
days:
description: 'Días que se conservan las ejecuciones'
required: true
type: number
default: 30
minimum_runs:
description: 'Cantidad mínima de ejecuciones a conservar'
required: true
type: number
default: 6
delete_workflow_pattern:
description: 'Nombre o archivo del workflow a eliminar'
required: false
delete_workflow_by_state_pattern:
description: 'Eliminar por estado'
required: true
default: "All"
type: choice
options:
- "All"
- active
- deleted
- disabled_inactivity
- disabled_manually
delete_run_by_conclusion_pattern:
description: 'Eliminar por conclusión'
required: true
default: "All"
type: choice
options:
- "All"
- action_required
- cancelled
- failure
- skipped
- success
dry_run:
description: 'Ejecutar sin eliminar'
required: false

jobs:
del_runs:
runs-on: ubuntu-latest
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2
with:
retain_days: ${{ github.event.inputs.days }}
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }}
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }}
delete_run_by_conclusion_pattern: ${{ github.event.inputs.delete_run_by_conclusion_pattern }}
dry_run: ${{ github.event.inputs.dry_run }}
17 changes: 17 additions & 0 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: doxygen-deploy
run-name: Generando y publicando documentación

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: DenverCoder1/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
folder: doc/doxygen/html
branch: doxygen
26 changes: 26 additions & 0 deletions .github/workflows/release-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: release-windows
run-name: Adjuntando binario a ${{ github.event.release.tag_name }}

on:
release:
types: [published]

jobs:
upload:
name: Upload release binary
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Restore binary
uses: actions/cache/restore@v4
with:
path: aleph.exe
key: aleph-${{ hashFiles('src/**/*.[chyl]', 'Makefile') }}
fail-on-cache-miss: true

- name: Upload binary
uses: AButler/[email protected]
with:
files: "aleph.exe"
repo-token: ${{ secrets.GITHUB_TOKEN }}
45 changes: 45 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: test-windows
run-name: Testeando en Windows

on:
workflow_run:
workflows: [build-windows]
types: [completed]

jobs:
test:
runs-on: windows-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Set pending status
uses: myrotvorets/[email protected]
with:
status: pending
sha: ${{ github.event.workflow_run.head_sha }}

- name: Checkout
uses: actions/checkout@v4

- name: Restore binary
uses: actions/cache/restore@v4
with:
path: aleph.exe
key: aleph-${{ hashFiles('src/**/*.[chyl]', 'Makefile') }}
fail-on-cache-miss: true

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '>=3.10'

- name: Run tests
run: python test/test.py >> $env:GITHUB_STEP_SUMMARY
env:
PYTHONUTF8: 1

- name: Set result status
uses: myrotvorets/[email protected]
if: always()
with:
status: ${{ job.status }}
sha: ${{ github.event.workflow_run.head_sha }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.*
!.gitignore
!.github
*.exe
*.dot
*.png
doc/doxygen/html/*
!doc/doxygen/html/.gitkeep
doc/latex
Loading

0 comments on commit 57cd551

Please sign in to comment.