mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Merge pull request #339 from crystal-ameba/Sija/tweak-ci
This commit is contained in:
commit
c5748aec71
2 changed files with 29 additions and 8 deletions
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
@ -2,7 +2,9 @@ name: CI
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
schedule:
|
||||
- cron: "0 3 * * 1" # Every monday at 3 AM
|
||||
|
||||
|
@ -28,7 +30,10 @@ jobs:
|
|||
run: shards install
|
||||
|
||||
- name: Run specs
|
||||
run: make test
|
||||
run: crystal spec
|
||||
|
||||
- name: Check formatting
|
||||
run: crystal tool format --check
|
||||
- name: Build ameba binary
|
||||
run: shards build -Dpreview_mt
|
||||
|
||||
- name: Run ameba linter
|
||||
run: bin/ameba --all
|
||||
|
|
26
Makefile
26
Makefile
|
@ -4,19 +4,35 @@ PREFIX ?= /usr/local
|
|||
SHARD_BIN ?= ../../bin
|
||||
CRFLAGS ?= -Dpreview_mt
|
||||
|
||||
build: bin/ameba
|
||||
bin/ameba:
|
||||
.PHONY: build
|
||||
build:
|
||||
$(SHARDS_BIN) build $(CRFLAGS)
|
||||
|
||||
.PHONY: lint
|
||||
lint: build
|
||||
./bin/ameba --all
|
||||
|
||||
.PHONY: spec
|
||||
spec:
|
||||
$(CRYSTAL_BIN) spec
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f ./bin/ameba ./bin/ameba.dwarf
|
||||
|
||||
.PHONY: install
|
||||
install: build
|
||||
mkdir -p $(PREFIX)/bin
|
||||
cp ./bin/ameba $(PREFIX)/bin
|
||||
|
||||
.PHONY: bin
|
||||
bin: build
|
||||
mkdir -p $(SHARD_BIN)
|
||||
cp ./bin/ameba $(SHARD_BIN)
|
||||
|
||||
.PHONY: run_file
|
||||
run_file:
|
||||
cp -n ./bin/ameba.cr $(SHARD_BIN) || true
|
||||
test: build
|
||||
$(CRYSTAL_BIN) spec
|
||||
./bin/ameba --all
|
||||
|
||||
.PHONY: test
|
||||
test: spec lint
|
||||
|
|
Loading…
Reference in a new issue