Skip to content

Commit

Permalink
Create makefile.yml (#1)
Browse files Browse the repository at this point in the history
Add Github actions to repo
  • Loading branch information
magnmaeh authored Jan 25, 2024
1 parent d1a440e commit b0a80f8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 33 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Makefile CI

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

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Docker test
run: docker run -v ${PWD}:/work --user $(id -u):$(id -g) -e CCACHE_DIR=/work/.ccache --entrypoint make verilator/verilator:stable
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
examples/**/obj_dir
examples/**/*.txt
examples/**/*.vcd
30 changes: 0 additions & 30 deletions examples/and/trace.vcd

This file was deleted.

5 changes: 2 additions & 3 deletions verilator.mk
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

VERILATOR_EXE := obj_dir/V$(PROJECT_NAME)
VERILATOR_ARGS += --cc --build --exe --trace

CPP_FLAGS += -I $(VERILATOR_ROOT)/obj_dir
PARSER ?= $(VERILATOR_ROOT)/default_parser.sh

VERILATOR_ARGS += --cc --build --exe --trace

all: run

Expand All @@ -15,7 +14,7 @@ $(VERILATOR_EXE): lint | $(SOURCES)
verilator $(VERILATOR_ARGS) $(SIMFILES) $(SOURCES) > /dev/null

run: $(VERILATOR_EXE)
-@set -o pipefail; ./$(VERILATOR_EXE) | tee output.txt; ./$(PARSER) $(PROJECT_NAME) $$? output.txt
./$(VERILATOR_EXE) | tee output.txt; ./$(PARSER) $(PROJECT_NAME) $$? output.txt

clean:
rm -rf obj_dir
Expand Down

0 comments on commit b0a80f8

Please sign in to comment.