Skip to content

Commit

Permalink
ci: 不再现场生成编译器代码,而是使用已有的
Browse files Browse the repository at this point in the history
  • Loading branch information
fy0 committed May 14, 2024
1 parent 538b85c commit 058db13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/jsport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,11 @@ jobs:
with:
go-version: 1.18

- name: Install peg
run: |
go install github.com/fy0/pigeon@latest
- name: Install gopherjs
run: |
go get -u github.com/gopherjs/[email protected]
go install github.com/gopherjs/[email protected]
- name: Code gen
run: pigeon -nolint -optimize-parser -o roll.peg.go roll.peg

- name: Build
run: gopherjs build github.com/sealdice/dicescript/jsport -o jsport/dicescript.cjs

Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/test_and_lint.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
on:
push:
paths:
- '**.go'
- 'go.mod'
- '**.peg'
pull_request:
paths:
- '**.go'
- 'go.mod'
- '**.peg'
branches: [ "main" ]

name: Test & Lint

Expand All @@ -22,8 +14,6 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: stable
- run: go install github.com/fy0/pigeon@latest
- run: pigeon -nolint -optimize-parser -o roll.peg.go roll.peg
- run: go mod tidy
- run: go get
- run: go generate ./...
Expand All @@ -39,8 +29,6 @@ jobs:
with:
go-version: '1.18'

- run: go install github.com/fy0/pigeon@latest
- run: pigeon -nolint -optimize-parser -o roll.peg.go roll.peg
- run: go mod tidy
- run: go get
- run: go generate ./...
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,11 @@ DiceScript将使用和RollVM相同的技术栈,但会有更好的接口设计

* d2d(4d4d5)d6 计算过程问题
* 处理

## 开发

如果修改了文法:
```
go install github.com/fy0/pigeon@latest
pigeon -nolint -optimize-parser -optimize-ref-expr-by-index -o .\roll.peg.go .\roll.peg
```

0 comments on commit 058db13

Please sign in to comment.