diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..69010e3df --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,17 @@ +name: deploy + +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-20.04 + steps: + - run: cargo install mdbook --version 0.4.6 + - run: cd mdbook && mdbook build + - uses: JamesIves/github-pages-deploy-action@4.0.0 + with: + branch: gh-pages + folder: mdbook diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 3c13d1be2..000000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Rust - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..4d4c3aee0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,18 @@ +name: test + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - run: rustup update 1.50.0 --no-self-update && rustup default 1.50.0 + - run: cargo build + - name: test mdBook + # rustdoc doesn't build dependencies, so it needs to run after `cargo build`, + # but its dependency search gets confused if there are multiple copies of any + # dependency in target/debug/deps, so it needs to run before `cargo test` et al. + # clutter target/debug/deps with multiple copies of things. + run: for file in $(find mdbook -name '*.md'); do rustdoc --test $file -L ./target/debug/deps; done + - run: cargo test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8ed49f737..000000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -dist: xenial -language: rust -rust: -- stable -install: -- pip install --user ghp-import -script: -- cargo build -# rustdoc doesn't build dependencies, so it needs to run after `cargo build`, -# but its dependency search gets confused if there are multiple copies of any -# dependency in target/debug/deps, so it needs to run before `cargo test` et al. -# clutter target/debug/deps with multiple copies of things. -- for file in $(find mdbook -name '*.md'); do rustdoc --test $file -L ./target/debug/deps; done -- cargo test -- cargo bench -- cargo doc -after_success: | - [ $TRAVIS_BRANCH = master ] && - [ $TRAVIS_PULL_REQUEST = false ] && - cargo install mdbook && - (cd mdbook; mdbook build) && - ghp-import -n mdbook/book && - git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages -env: - global: - - secure: CzDrbiXWbvgjqZn1z5aFcttW90tWT4LpEc9bSJ/Wb0i4QvABAaOefw3Griu9MT9vNvbyM1ysk8fzXMHXF1ivhUZFzV4MRr+nrKg4LTg/upDAVAEOjWdrFUJOp17a+PVS3K83zrVxeZMkmQe4ACB3a9hsHilKp635xgizSJWQ6Wo=