Skip to content

Commit

Permalink
Merge branch 'main' into release-plz-2023-12-01T22-13-03Z
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJepsen authored Feb 8, 2024
2 parents 96be9f3 + ca09b29 commit 3f94ab4
Show file tree
Hide file tree
Showing 106 changed files with 32,859 additions and 4,146 deletions.
17 changes: 0 additions & 17 deletions .github/codecov.yml

This file was deleted.

90 changes: 43 additions & 47 deletions .github/workflows/book.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,73 +12,69 @@ on:
merge_group:

jobs:
test:
build:
runs-on: ubuntu-latest
name: test

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

# Install Rust
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

# Install mdbook
- name: Install mdbook
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
run: cargo install mdbook --vers "^0.4.35"

- name: Install mdbook-template
run: |
mkdir mdbook-template
curl -sSL https://github.com/sgoudham/mdbook-template/releases/latest/download/mdbook-template-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-template
echo `pwd`/mdbook-template >> $GITHUB_PATH
# Install mdbook-katex
- name: Install mdbook-katex
run: cargo install mdbook-katex

- name: Run tests
run: mdbook test
# Build book
- name: build book
run: mdbook build

lint:
runs-on: ubuntu-latest
name: lint

steps:
- uses: actions/checkout@v3

with:
fetch-depth: 0

# Install Rust
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

# Install mdbook-linkcheck
- name: Install mdbook-linkcheck
run: |
mkdir mdbook-linkcheck
curl -sSL -o mdbook-linkcheck.zip https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/latest/download/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip
unzip mdbook-linkcheck.zip -d ./mdbook-linkcheck
chmod +x `pwd`/mdbook-linkcheck/mdbook-linkcheck
echo `pwd`/mdbook-linkcheck >> $GITHUB_PATH
- name: Run linkcheck
run: cargo install mdbook-linkcheck

- name: linkcheck
run: mdbook-linkcheck --standalone

build:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
# Install Rust
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
cache-on-failure: true

- name: Install mdbook
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Install mdbook-template
run: |
mkdir mdbook-template
curl -sSL https://github.com/sgoudham/mdbook-template/releases/latest/download/mdbook-template-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-template
echo `pwd`/mdbook-template >> $GITHUB_PATH
- name: Build book
run: mdbook build documentation

- name: Build docs
run: RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --all --no-deps
toolchain: stable
override: true

- name: test
run: cargo test --package documentation
60 changes: 60 additions & 0 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Sample workflow for building and deploying a mdBook site to GitHub Pages
#
# To get started with mdBook see: https://rust-lang.github.io/mdBook/index.html
#
name: Deploy mdBook site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.36
steps:
- uses: actions/checkout@v4
- name: Install mdBook
run: |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
rustup update
cargo install --version ${MDBOOK_VERSION} mdbook
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build with mdBook
run: mdbook build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./book/html

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
26 changes: 1 addition & 25 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,4 @@ jobs:
override: true

- name: test
run: cargo test --workspace --all-features

codecov:
name: codecov
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: codecov
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: lcov.info
fail_ci_if_error: true
run: cargo test --workspace --all-features --exclude documentation
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ arbiter/
book

arbiter-core/data
example_fork/test.json
example_fork/test.json

doctest_cache/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "arbiter-bindings/lib/solstat"]
path = arbiter-bindings/lib/solstat
url = https://github.com/primitivefinance/solstat
[submodule "arbiter-bindings/lib/ds-test"]
path = arbiter-bindings/lib/ds-test
url = https://github.com/dapphub/ds-test
3 changes: 2 additions & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ use_field_init_shorthand = true

wrap_comments = true
normalize_comments = true
comment_width = 80
comment_width = 80
edition = "2021"
Loading

0 comments on commit 3f94ab4

Please sign in to comment.