This commit is contained in:
Kreyren 2020-02-10 17:41:28 +00:00
parent 8b9c7a140e
commit 9a3e8ce031
4 changed files with 57 additions and 84 deletions

@ -36,53 +36,4 @@ jobs:
- name: Test with pytest
run: |
pip install pytest
for file in $(git --no-pager diff --name-only origin/master | grep -o ".*\.py") ;do pytest "$file";done
# Kernel specific builds
build-python:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: building..
run: make build-python
# Docker builds
build-python-debian:
runs-on: ubuntu-latest
steps:
- uses: docker://debian/testing:latest
- uses: actions/checkout@v2
- name: building..
run: make build-python
build-python-fedora:
runs-on: ubuntu-latest
steps:
- uses: docker://fedora/latest:latest
- uses: actions/checkout@v2
- name: building..
run: make build-python
# Run tests
check-python:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: running tests..
run: make check-python
# Benchmarks
bench-python:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: running benchmarks..
run: make bench-python
for file in $(git --no-pager diff --name-only origin/master | grep -o ".*\.py") ;do pytest "$file";done

@ -6,55 +6,71 @@ on:
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
paths:
- '**.rs'
- - "${{ secrets.GITHUB_WORKSPACE }}/*.\\.rs"
jobs:
# Kernel specific builds
build-rustlang:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
ubuntu-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: building..
run: make build-rustlang
- name: Building..
run: cargo build
macos-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Building..
run: cargo build
windows-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Building..
run: cargo build
# Docker builds
build-rustlang-debian:
debian-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker://debian/testing:latest
- uses: actions/checkout@v2
- name: building..
run: make build-rustlang
build-rustlang-fedora:
- name: Building..
run: cargo build
fedora-build:
runs-on: ubuntu-latest
steps:
- uses: docker://fedora/latest:latest
- uses: actions/checkout@v2
- name: building..
run: make build-rustlang
- uses: docker://fedora/latest:latest
- name: Building..
run: cargo build
archlinux-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker://archlinux/latest:latest
- name: Building..
run: cargo build
gentoo-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker://gentoo/stage3-amd64:latest
- name: Building..
run: cargo build
# Run tests
check-rustlang:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: running tests..
run: make check-rustlang
- name: Testing..
run: cargo test
# Benchmarks
bench-rustlang:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: running benchmarks..
run: make bench-rustlang
- name: Benchmarking..
run: cargo bench

@ -23,6 +23,6 @@ zernit-logger = { path = "src/libs/rustlang/zernit-logger" }
# Used for benchmarking
criterion = "0.3.1"
# [[bench]]
# name = "example_bench"
# harness = false
[[bench]]
name = "example_bench"
harness = false

@ -1,5 +1,11 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
/*
This is base benchmark made for consistency
FIXME-BENCH: Make cargo to recognize `benches/rustlang` path instead of `benches/`
*/
fn fibonacci(n: u64) -> u64 {
match n {
0 => 1,