Skip to content

Commit

Permalink
cache ruby 2.6 build (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
fables-tales committed Jul 6, 2020
1 parent d271862 commit 2876183
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/2.6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git submodule init && git submodule update
- uses: actions-rs/cargo@v1
- uses: actions/cache@v2
with:
Expand All @@ -25,6 +26,11 @@ jobs:
target
librubyfmt/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v2
with:
path: |
librubyfmt/ruby_checkout/ruby-2.6.6
key: ${{ runner.os }}-ruby26-full
- uses: actions/setup-ruby@v1.0.0
with:
version: 2.6
Expand Down
1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
fn main() {
// this is wild
#[cfg(target_os = "macos")]
{
println!("cargo:rustc-link-lib=framework=foundation");
Expand Down
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ fn main() {
panic!("bad init status");
}
let args: Vec<String> = std::env::args().collect();
if args.len() >= 2 && (args[1] == "--help" || args[1] == "-h") {
eprintln!("{}", include_str!("../README.md"));
exit(1);
}

if args.len() == 1 {
// consume stdin
let mut buffer = String::new();
Expand Down

0 comments on commit 2876183

Please sign in to comment.