Skip to content

Commit

Permalink
CI setup (#11)
Browse files Browse the repository at this point in the history
Configure simple CI for generating lexer files and Gradle tasks (build project, run Junit test)
  • Loading branch information
bachish authored Jan 18, 2024
1 parent 3c7bb19 commit fba0491
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build project

#workflow_dispatch -- for manual trigger
on: [ push, workflow_dispatch ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'

- name: Generate JFlex files
run: |
sudo apt-get install -y jflex
./generate_lexers.sh
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build
10 changes: 10 additions & 0 deletions generate_lexers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

shopt -s nullglob #ingore failed patterns

cd src/main/kotlin/org/srcgll/lexer

for lexer_name in *.jflex *.jlex *.lex *.flex *.x
do
jflex $lexer_name
done

0 comments on commit fba0491

Please sign in to comment.