Skip to content

Commit

Permalink
test buckify (#35)
Browse files Browse the repository at this point in the history
Summary:
adds a github actions smoke test for the 'buckify' command.

fails on windows in the same way we have observed the buck2 setup reindeer step failing so is a minimal reproducer for that and thus am not running this test on windows while we work it out.


Test Plan:
Imported from GitHub, without a `Test Plan:` line. 
https://github.com/facebookincubator/reindeer/actions/runs/7616629909/job/20743842687

Differential Revision: D52968685

Pulled By: shayne-fletcher
  • Loading branch information
Shayne Fletcher authored and facebook-github-bot committed Jan 23, 2024
1 parent 3977c54 commit 119cf2e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: |-
echo CARGO_HOME=$GITHUB_WORKSPACE/.cargo >> $GITHUB_ENV
echo $GITHUB_WORKSPACE/.cargo/bin >> $GITHUB_PATH
shell: bash
if: matrix.os == 'windows'
- run: cargo build --locked
- run: cargo test
- run: |-
cd example
./setup.sh # run reindeer buckify
cat ./third-party/BUCK
shell: bash
18 changes: 9 additions & 9 deletions example/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# Set up vendored directory
# Generate file 'example/third-party/BUCK'.

set -e

(cd ..; cargo build)

# Vendor the crates into third-party/vendor
# This will resolve all the dependencies, and create or update third-party/Cargo.lock as required.
# Typically you would then checkin Cargo.lock and all the vendored code in third-party/vendor
../target/debug/reindeer --third-party-dir third-party vendor

# Build a BUCK file to build third-party crates.
# This is separate from vendoring as you may need to run it a few times if it reports needing a fixup.
# It will create a template fixup.toml which you can edit as needed. You would typically commit
# these fixups and the generated third-party/BUCK in the same commit as above.
#
# This will resolve all the dependencies, and create or update
# third-party/Cargo.lock as required.
#
# It will create a template fixup.toml which you can edit as needed. You would
# typically commit these fixups and the generated third-party/BUCK in the same
# commit as above.

../target/debug/reindeer --third-party-dir third-party buckify

0 comments on commit 119cf2e

Please sign in to comment.