Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI should test whether generated files match latest sources #50

Open
osteele opened this issue Jun 27, 2021 · 0 comments
Open

CI should test whether generated files match latest sources #50

osteele opened this issue Jun 27, 2021 · 0 comments

Comments

@osteele
Copy link
Owner

osteele commented Jun 27, 2021

The CI should test whether the generated files (expressions.go and y.go) match the sources.

The following GitHub Action will do this:

  - name: Test generated code
  - run: |
      make generate
      git diff --exit-code

The missing pieces are:

1. Installing Ragel

This works:

  - name: Install Ragel
    run: |
      sudo apt-get update
      sudo apt-get install 

However, this requires apt-get update and apt-get install on each run.

Is there a way to cache this? Alternatively, should this action use a Docker image that includes Ragel?

2. Installing goyacc

I tried this:

Add a step:

  - name: Install generators
    run: make setup
  - name: Run generators
    run: make generate

(make setup includes go install golang.org/x/tools/cmd/goyacc. make generate runs go generate ./....)

This produces an error:

expressions/parser.go:3: running "goyacc": exec: "goyacc": executable file not found in $PATH
make: *** [Makefile:24: generate] Error 1
Error: Process completed with exit code 2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant