Skip to content

Commit

Permalink
Merge Github Actions workflows
Browse files Browse the repository at this point in the history
type: development
  • Loading branch information
casey committed Apr 8, 2020
1 parent 151d912 commit 972a1ec
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 33 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
- os: windows-latest
target: x86_64-pc-windows-msvc
runs-on: ${{matrix.os}}
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v2
- name: Install Stable
Expand All @@ -43,8 +45,7 @@ jobs:
cargo --version
cargo clippy --version
- name: Build
run: RUSTFLAGS="-D warnings" cargo build --all --verbose
shell: bash
run: cargo build --all --verbose
- name: Test
run: cargo test --all --verbose
- name: Clippy
Expand All @@ -66,11 +67,24 @@ jobs:
run: |
cargo run --package update-readme toc
git diff --no-ext-diff --quiet --exit-code
- name: Install `mdbook`
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: latest
- name: Build Book
run: mdbook build book --dest-dir ../www/book
- name: Deploy Book
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{secrets.GITHUB_TOKEN}}
publish_branch: gh-pages
publish_dir: ./www
- name: Package
id: package
if: startsWith(github.ref, 'refs/tags/v')
run: ./bin/package ${{github.ref}} ${{matrix.os}} ${{matrix.target}}
shell: bash
run: ./bin/package ${{github.ref}} ${{matrix.os}} ${{matrix.target}}
- name: Publish
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/www.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions src/subcommand/torrent/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1809,17 +1809,17 @@ Content Size 9 bytes
fn populate_symlinks(env: &Env) {
let dir = env.resolve("foo");
let file_src = env.resolve("bar");
let file_link = env.resolve("foo/bar");
let dir_src = env.resolve("dir-src");
let dir_contents = dir_src.join("baz");
let dir_link = env.resolve("foo/dir");
fs::create_dir(&dir_src).unwrap();
fs::write(dir_contents, "baz").unwrap();

fs::create_dir(&dir).unwrap();
fs::write(file_src, "bar").unwrap();
#[cfg(unix)]
{
let file_link = env.resolve("foo/bar");
let dir_link = env.resolve("foo/dir");
Command::new("ln")
.arg("-s")
.arg("../bar")
Expand Down
2 changes: 2 additions & 0 deletions src/test_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ impl TestEnv {
fs::create_dir(self.env.resolve(path)).unwrap();
}

#[cfg(unix)]
pub(crate) fn metadata(&self, path: impl AsRef<Path>) -> fs::Metadata {
fs::metadata(self.env.resolve(path)).unwrap()
}

#[cfg(unix)]
pub(crate) fn set_permissions(&self, path: impl AsRef<Path>, permissions: fs::Permissions) {
fs::set_permissions(self.env.resolve(path), permissions).unwrap();
}
Expand Down

0 comments on commit 972a1ec

Please sign in to comment.