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
|
||||
|
||||
jobs:
|
||||
assert-linear:
|
||||
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:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
|
@ -25,63 +15,7 @@ jobs:
|
|||
with:
|
||||
go-version-file: ./go.mod
|
||||
cache: true
|
||||
- run: COLOR=1 ./make.sh fmt
|
||||
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
|
||||
- run: COLOR=1 ./make.sh all race
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
|
||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||
|
|
@ -90,22 +24,3 @@ jobs:
|
|||
with:
|
||||
name: d2chaos-test
|
||||
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
|
||||
|
||||
jobs:
|
||||
all:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
|
@ -20,7 +20,7 @@ jobs:
|
|||
with:
|
||||
go-version-file: ./go.mod
|
||||
cache: true
|
||||
- run: CI_ALL=1 COLOR=1 ./make.sh
|
||||
- run: COLOR=1 CI_FORCE=1 ./make.sh all race
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
|
||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||
|
|
|
|||
6
Makefile
6
Makefile
|
|
@ -2,9 +2,6 @@
|
|||
|
||||
.PHONY: all
|
||||
all: fmt gen lint build test
|
||||
ifdef CI
|
||||
all: assert-linear
|
||||
endif
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
|
|
@ -24,6 +21,3 @@ test:
|
|||
.PHONY: race
|
||||
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