-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit updated with some important feedback from @dtolnay. Thank you!
- Loading branch information
1 parent
2abd1ad
commit 914e3aa
Showing
10 changed files
with
94 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| test: | ||
| name: ${{matrix.name || format('Rust {0}', matrix.rust)}} | ||
| runs-on: ${{matrix.os || 'ubuntu'}}-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - rust: nightly | ||
| - rust: beta | ||
| - rust: stable | ||
| - rust: 1.69.0 | ||
| - name: Cargo on macOS | ||
| rust: nightly | ||
| os: macos | ||
| - name: Cargo on Windows (msvc) | ||
| rust: nightly-x86_64-pc-windows-msvc | ||
| os: windows | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: ${{matrix.rust}} | ||
| - run: cargo check | ||
| - run: cargo run | ||
|
|
||
| buck: | ||
| name: Buck2 on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}} | ||
| runs-on: ${{matrix.os}}-latest | ||
| if: github.event_name != 'pull_request' | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu, macos, windows] | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| submodules: true | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: rust-src | ||
| - uses: dtolnay/install-buck2@latest | ||
| - run: buck2 build ... | ||
| - run: buck2 run //src/bin:hello_world | ||
|
|
||
| - uses: actions/cache/restore@v3 | ||
| id: cache | ||
| with: | ||
| path: ~/.cargo/bin/reindeer${{matrix.os == 'windows' && '.exe' || ''}} | ||
| key: ${{matrix.os}}-reindeer | ||
|
|
||
| - run: cargo install --git https://github.com/facebookincubator/reindeer reindeer | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
|
|
||
| - uses: actions/cache/save@v3 | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| with: | ||
| path: ~/.cargo/bin/reindeer${{matrix.os == 'windows' && '.exe' || ''}} | ||
| key: ${{steps.cache.outputs.cache-primary-key}} | ||
|
|
||
| - run: reindeer buckify | ||
| working-directory: third-party | ||
| if: matrix.os == 'ubuntu' | ||
| - name: Check reindeer-generated BUCK file up to date | ||
| run: git diff --exit-code | ||
| if: matrix.os == 'ubuntu' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| buck-out | ||
| /buck-out | ||
| target |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,3 +5,6 @@ edition = "2021" | |
|
|
||
| [lib] | ||
| path = "src/lib/print_hello.rs" | ||
|
|
||
| [dependencies] | ||
| semver = "1.0.17" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,4 +5,5 @@ rust_binary( | |
| deps = [ | ||
| "//third-party:semver", | ||
| ], | ||
| visibility = ["PUBLIC"], | ||
| ) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters