Skip to content

Commit

Permalink
Merge #37
Browse files Browse the repository at this point in the history
37: Add CI check for redox OS r=lzutao a=lzutao

We actively support redox OS, so it would be nice to have a CI job for the target.

Co-authored-by: Lzu Tao <taolzu@gmail.com>
  • Loading branch information
bors[bot] and tesuji committed Oct 13, 2020
2 parents ea8fc50 + 3a37e11 commit 2be586e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 13 deletions.
53 changes: 41 additions & 12 deletions .github/workflows/main.yml
Expand Up @@ -26,6 +26,17 @@ jobs:
- run: cargo build --all-targets --workspace
- run: cargo test --all-targets --workspace

redox_check:
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v2
- run: |
rustup default nightly
rustup target add x86_64-unknown-redox
- run: cargo check --all-targets --workspace --target x86_64-unknown-redox

rustfmt:
runs-on: ubuntu-latest
steps:
Expand All @@ -34,24 +45,42 @@ jobs:
- run: cargo fmt -- --check

minimum-rust-version:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
rustup toolchain install 1.34.0
rustup default 1.34.0
- run: cargo build --all-targets --all
rustup target add \
x86_64-pc-windows-gnu \
x86_64-apple-darwin \
x86_64-pc-windows-msvc
- run: |
for target in x86_64-pc-windows-gnu x86_64-apple-darwin x86_64-pc-windows-msvc; do
echo "== checking $target =="
cargo check --all-targets --all --target "$target"
done
shell: bash
clippy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup component add clippy
# FIXME: Remove `-- -A clippy::option_as_ref_deref` when MSRV is bumped past 1.40.0
- run: cargo clippy --all --all-targets -- -A clippy::option_as_ref_deref
- run: |
rustup component add clippy
rustup target add \
x86_64-pc-windows-gnu \
x86_64-apple-darwin \
x86_64-pc-windows-msvc
- run: |
for target in x86_64-pc-windows-gnu x86_64-apple-darwin x86_64-pc-windows-msvc; do
echo "== checking $target =="
cargo check --all-targets --all --target "$target"
git ls-files '*lib.rs' | xargs touch
# FIXME: Remove `-- -A clippy::option_as_ref_deref` when MSRV is bumped past 1.40.0
cargo clippy --all-targets --all --target "$target" \
-- \
-A clippy::option_as_ref_deref \
-A clippy::redundant_field_names
done
shell: bash
2 changes: 1 addition & 1 deletion dirs-sys/src/lib.rs
Expand Up @@ -68,7 +68,7 @@ mod target_redox {

use std::path::PathBuf;

use super::redox_users::{All, AllUsers, Config};
use redox_users::{All, AllUsers, Config};

pub fn home_dir() -> Option<PathBuf> {
let current_uid = redox_users::get_uid().ok()?;
Expand Down

0 comments on commit 2be586e

Please sign in to comment.