Skip to content

Commit

Permalink
Try #37:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] committed Oct 13, 2020
2 parents ea8fc50 + eb791d5 commit e92363c
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 21 deletions.
75 changes: 63 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,64 @@ 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
# These jobs doesn't actually test anything, but they're only used to tell
# bors the build completed, as there is no practical way to detect when a
# workflow is successful listening to webhooks only.
#
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
end-success:
name: bors build finished
runs-on: ubuntu-latest
needs: [build]
if: github.event.pusher.name == 'bors' && success()
steps:
- name: mark the job as a success
run: exit 0
end-failure:
name: bors build finished
runs-on: ubuntu-latest
needs: [build]
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
steps:
- name: mark the job as a failure
run: exit 1
9 changes: 1 addition & 8 deletions bors.toml
@@ -1,11 +1,4 @@
status = [
"build (ubuntu-latest)",
"build (windows-latest)",
"build (macos-latest)",
"minimum-rust-version (ubuntu-latest)",
"minimum-rust-version (windows-latest)",
"minimum-rust-version (macos-latest)",
]
status = ["bors build finished"]

# Default timeout is one hour
timeout_sec = 600
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 e92363c

Please sign in to comment.