Skip to content
This repository has been archived by the owner on Apr 18, 2022. It is now read-only.

Move cargo fmt checks and some other jobs to stable, ubuntu-latest #2450

Merged
merged 4 commits into from
Aug 29, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,45 +51,45 @@ jobs:
# Don't use a 'components:' entry--we don't need them with beta/nightly, plus nightly often doesn't have them
override: true

- run: rustup component add rustfmt clippy
if: contains(matrix.toolchain, 'stable')
- run: rustup component add clippy
if: matrix.toolchain == 'stable'

- run: rustup component add rustfmt
if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'

- run: cargo fmt --all -- --check
if: contains(matrix.toolchain, 'stable')
if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'

- run: cargo clippy --features=${{matrix.FEATURES}} --workspace
if: contains(matrix.toolchain, 'stable')
if: matrix.toolchain == 'stable'

- name: clean clippy-generated amethyst libs
# Remove the clippy-generated amethyst files.
# They mess up `mdbook test` later on for some reason
run: rm -rf ./target/debug/deps/libamethyst*
if: contains(matrix.os, 'macos') || contains(matrix.os, 'linux')
if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'

- name: run tests
run: |
cargo test --workspace --features=${{matrix.FEATURES}}
- run: cargo test --workspace --features=${{matrix.FEATURES}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the concise, descriptive names, but I am willing to approve the PR without them.

Copy link
Contributor Author

@Veetaha Veetaha Aug 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for me, a simple cargo foo invocation looks descriptive enough by itself...

env:
MACOS: ${{ matrix.MACOS }} # Used by some tests
MACOS: ${{ matrix.MACOS }} # Used by some tests

- name: install mdbook on stable macos
- name: install mdbook on stable, ubuntu-latest
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
if: contains(matrix.toolchain, 'stable') && contains(matrix.os, 'macos')

# Should be working, but postponing until after we go live with GitHub Actions
# - name: install mdbook-linkcheck on stable macos
# run: |
# curl -L https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.0/mdbook-linkcheck-v0.7.0-x86_64-apple-darwin.tar.gz | tar -xz && mv mdbook-linkcheck /Users/runner/.cargo/bin/mdbook-linkcheck
# chmod a+x /Users/runner/.cargo/bin/mdbook-linkcheck
# echo -e "\n\n[output.linkcheck]" >> book/book.toml ## PROBABLY REMOVE THIS IN FAVOR OF ALWAYS HAVING IT AS OPTIONAL IN THE CONFIG
# if: contains(matrix.toolchain, 'stable') && contains(matrix.os, 'macos')

- name: build mdbook on stable macos
run: mdbook build book
if: contains(matrix.toolchain, 'stable') && contains(matrix.os, 'macos')

- name: run mdbook tests on stable macos
run: mdbook test -L ./target/debug/deps book
if: contains(matrix.toolchain, 'stable') && contains(matrix.os, 'macos')
if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'

# Should be working, but postponing until after we go live with GitHub Actions
# - name: install mdbook-linkcheck on stable, ubuntu-latest
# env:
# LINKCHECK_URL: https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.0/mdbook-linkcheck-v0.7.0-x86_64-unknown-linux-gnu.tar.gz
# run: |
# curl -L ${{ env.LINKCHECK_URL }} | tar -C ~/.cargo/bin -xzf -
# echo -e "\n\n[output.linkcheck]" >> book/book.toml ## PROBABLY REMOVE THIS IN FAVOR OF ALWAYS HAVING IT AS OPTIONAL IN THE CONFIG
# if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'

- run: mdbook build book
if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'

- run: mdbook test -L ./target/debug/deps book
if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'