feat(ci/cd): add running gossip + benchmarks #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: check | |
on: | |
push: | |
branches: [main, pre-release] | |
pull_request_review: | |
types: [submitted] | |
pull_request: | |
types: [review_requested] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: setup-zig | |
uses: goto-bus-stop/setup-zig@v1 | |
with: | |
version: 0.12.0 | |
- name: lint | |
run: | | |
zig fmt --check src/ | |
zig fmt --check build.zig | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: setup-zig | |
uses: goto-bus-stop/setup-zig@v1 | |
with: | |
version: 0.12.0 | |
- name: test | |
run: zig build test | |
benchmarks: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: setup-zig | |
uses: goto-bus-stop/setup-zig@v1 | |
with: | |
version: 0.12.0 | |
- name: benchmarks | |
run: zig build -Doptimize=ReleaseSafe benchmark | |
gossip: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: setup-zig | |
uses: goto-bus-stop/setup-zig@v1 | |
with: | |
version: 0.12.0 | |
- name: build release | |
run: zig build -Doptimize=ReleaseSafe | |
- name: run gossip | |
run: bash scripts/gossip_test.sh 120 # in seconds |