Skip to content

Add benchmark and profiling facilities #94

Add benchmark and profiling facilities

Add benchmark and profiling facilities #94

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
shell: bash
jobs:
test:
name: Test
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y libaom-dev
- name: Get dependencies
run: go mod download
- name: Run test
run: make test
lint:
name: Lint
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y libaom-dev
- name: Download modules
run: go mod download
- name: Run lint
run: make lint
- uses: dominikh/staticcheck-action@v1
with:
version: "latest"
install-go: false
benchmark:
name: Benchmark
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y libaom-dev
- name: Download modules
run: go mod download
- name: Run benchmark
run: make bench
profiling:
name: Profiling
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ["handler"]
type: ["cpu", "block", "mem"]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y libaom-dev
- name: Download modules
run: go mod download
- name: Run profiling
run: make prof
env:
PKG: ${{ matrix.package }}
TYPE: ${{ matrix.type }}