Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5b599c
commit 42c91c4
Showing
7 changed files
with
181 additions
and
29 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
coverage: | ||
runs-on: macos-latest | ||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | ||
|
||
strategy: | ||
matrix: | ||
box: | ||
- fbsd_13_0 | ||
- fbsd_12_2 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up vagrant | ||
run: vagrant up ${{ matrix.box }} | ||
|
||
- name: Install coverage prerequisites | ||
run: | | ||
vagrant ssh ${{ matrix.box }} -- sudo pkg install -y kcov | ||
vagrant ssh ${{ matrix.box }} -- cargo install cargo-kcov | ||
- name: Build | ||
run: vagrant ssh ${{ matrix.box }} -- "cd /vagrant; cargo build" | ||
|
||
- name: Collect coverage | ||
run: | | ||
vagrant ssh ${{ matrix.box }} -- "cd /vagrant; cargo kcov -- --verify --exclude-pattern=/home/vagrant/.cargo,/usr/lib,/usr/local/lib,/usr/src/lib/" | ||
vagrant ssh ${{ matrix.box }} -- "cd /vagrant/target; tar cf - cov/" | tar xv | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
fail_ci_if_error: true | ||
verbose: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Build docs | ||
|
||
on: | ||
release: | ||
types: published | ||
|
||
jobs: | ||
docs: | ||
runs-on: macos-latest | ||
|
||
strategy: | ||
matrix: | ||
box: | ||
- fbsd_13_0 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up vagrant | ||
run: vagrant up ${{ matrix.box }} | ||
|
||
- name: Build documentation | ||
run: vagrant ssh ${{ matrix.box }} -- "cd /vagrant; cargo doc; tar cf - target/doc/" | tar xv | ||
|
||
- name: Deploy documentation to GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@4.1.1 | ||
with: | ||
branch: gh-pages | ||
folder: target/doc/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: published | ||
|
||
jobs: | ||
docs: | ||
runs-on: macos-latest | ||
|
||
strategy: | ||
matrix: | ||
box: | ||
- fbsd_13_0 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up vagrant | ||
run: vagrant up ${{ matrix.box }} | ||
|
||
- name: Build documentation | ||
run: vagrant ssh ${{ matrix.box }} -- "cd /vagrant; cargo doc; tar cf - target/doc/" | tar xv | ||
|
||
- name: Deploy documentation to GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@4.1.1 | ||
with: | ||
branch: gh-pages | ||
folder: target/doc/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Lints | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
stylecheck: | ||
name: Style Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
use-cross: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --target x86_64-unknown-freebsd |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build_and_test: | ||
runs-on: macos-latest | ||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | ||
|
||
strategy: | ||
matrix: | ||
box: | ||
- fbsd_13_0 | ||
- fbsd_12_2 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up vagrant | ||
run: vagrant up ${{ matrix.box }} | ||
|
||
- name: Build | ||
run: vagrant ssh ${{ matrix.box }} -- "cd /vagrant; cargo build" | ||
|
||
- name: Test | ||
run: vagrant ssh ${{ matrix.box }} -- "cd /vagrant; cargo test --lib" | ||
|
||
- name: Docstests | ||
run: vagrant ssh ${{ matrix.box }} -- "cd /vagrant; cargo test --doc" | ||
|
||
- name: Build Docs | ||
run: vagrant ssh ${{ matrix.box }} -- "cd /vagrant; cargo doc" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.define "fbsd_13_0" do |fbsd_13_0| | ||
fbsd_13_0.vm.box = "freebsd/FreeBSD-13.0-RELEASE" | ||
end | ||
|
||
config.vm.define "fbsd_12_2" do |fbsd_12_2| | ||
fbsd_12_2.vm.box = "freebsd/FreeBSD-12.2-STABLE" | ||
end | ||
|
||
config.vm.synced_folder ".", "/vagrant", type: "rsync", | ||
rsync__exclude: ".git/", | ||
rsync__auto: true | ||
|
||
config.vm.provision "shell", inline: <<-SHELL | ||
pkg bootstrap | ||
pkg install -y rust | ||
SHELL | ||
end |