ci: Consolidate github actions into one main job
This commit is contained in:
parent
3f6b14cb00
commit
77ed56990a
4 changed files with 5 additions and 96 deletions
89
.github/workflows/ci.yml
vendored
89
.github/workflows/ci.yml
vendored
|
|
@ -5,17 +5,7 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
assert-linear:
|
ci:
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- run: COLOR=1 ./make.sh assert-linear
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
|
|
||||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
||||||
fmt:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
@ -25,63 +15,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version-file: ./go.mod
|
go-version-file: ./go.mod
|
||||||
cache: true
|
cache: true
|
||||||
- run: COLOR=1 ./make.sh fmt
|
- run: COLOR=1 ./make.sh all race
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
|
|
||||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
||||||
gen:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version-file: ./go.mod
|
|
||||||
cache: true
|
|
||||||
- run: COLOR=1 ./make.sh gen
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
|
|
||||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version-file: ./go.mod
|
|
||||||
cache: true
|
|
||||||
- run: COLOR=1 ./make.sh lint
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
|
|
||||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version-file: ./go.mod
|
|
||||||
cache: true
|
|
||||||
- run: COLOR=1 ./make.sh build
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
|
|
||||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version-file: ./go.mod
|
|
||||||
cache: true
|
|
||||||
- run: COLOR=1 ./make.sh test
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
|
||||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
|
|
@ -90,22 +24,3 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: d2chaos-test
|
name: d2chaos-test
|
||||||
path: ./d2chaos/out
|
path: ./d2chaos/out
|
||||||
race:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version-file: ./go.mod
|
|
||||||
cache: true
|
|
||||||
- run: COLOR=1 ./make.sh race
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
|
|
||||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
name: d2chaos-race
|
|
||||||
path: ./d2chaos/out
|
|
||||||
|
|
|
||||||
4
.github/workflows/daily.yml
vendored
4
.github/workflows/daily.yml
vendored
|
|
@ -10,7 +10,7 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
all:
|
ci:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version-file: ./go.mod
|
go-version-file: ./go.mod
|
||||||
cache: true
|
cache: true
|
||||||
- run: CI_ALL=1 COLOR=1 ./make.sh
|
- run: COLOR=1 CI_FORCE=1 ./make.sh all race
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
|
||||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
|
|
|
||||||
6
Makefile
6
Makefile
|
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: fmt gen lint build test
|
all: fmt gen lint build test
|
||||||
ifdef CI
|
|
||||||
all: assert-linear
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt:
|
fmt:
|
||||||
|
|
@ -24,6 +21,3 @@ test:
|
||||||
.PHONY: race
|
.PHONY: race
|
||||||
race:
|
race:
|
||||||
prefix "$@" ./ci/test.sh --race ./...
|
prefix "$@" ./ci/test.sh --race ./...
|
||||||
.PHONY: assert-linear
|
|
||||||
assert-linear:
|
|
||||||
prefix "$@" ./ci/sub/assert_linear.sh
|
|
||||||
|
|
|
||||||
2
ci/sub
2
ci/sub
|
|
@ -1 +1 @@
|
||||||
Subproject commit 824046d952b1442c76a057553591652c889fb7cb
|
Subproject commit 765e3ddc7bbd669f3605f9f877bc6004c1b80735
|
||||||
Loading…
Reference in a new issue