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 - name: Test with pytest
run: | run: |
pip install pytest pip install pytest
for file in $(git --no-pager diff --name-only origin/master | grep -o ".*\.py") ;do pytest "$file";done 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

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

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

@ -1,5 +1,11 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion}; 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 { fn fibonacci(n: u64) -> u64 {
match n { match n {
0 => 1, 0 => 1,