-
Notifications
You must be signed in to change notification settings - Fork 13
Set up CI to run buck2 samples #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
722674e
Set up CI to run buck2 samples
nlopezgi d99837b
Set up CI to run buck2 samples
nlopezgi ffd2b87
setting permissions
nlopezgi d77d44f
fix find command
nlopezgi 1043d33
fix find command
nlopezgi b241a7b
verbose shell
nlopezgi 21db2a3
fix runner id
nlopezgi 494f458
fixing building zstd
nlopezgi 252a68d
fix downloading buck2 binary
nlopezgi 4d50341
fix buck2 version
nlopezgi c7ff911
nit
nlopezgi 99ed06f
use debian 12
nlopezgi b70cd31
fix
nlopezgi 2860a92
use statically linked buck2 binary
nlopezgi 1cce485
fix auth header
nlopezgi 6169024
add env for github token
nlopezgi c3df3f9
remove unnecessary env
nlopezgi 870dce1
test using github auth for EF CI
nlopezgi b05fc96
test using github auth for EF CI
nlopezgi 9ec249e
test using github auth for EF CI
nlopezgi 97253f5
test using github auth for EF CI
nlopezgi e8bf516
test acces to container
nlopezgi 80f3e95
testing github auth
nlopezgi 1fa3578
cleaning up now that github auth is working
nlopezgi a7b06ac
fail on error on buck2 ci setup
nlopezgi 3d19f29
use installed zstd
nlopezgi fcec9c6
review comments
nlopezgi 9ad4056
move alias declaration to test-buck2.sh
nlopezgi ec88553
enabling aliases in shell script
nlopezgi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,9 @@ | ||
| #!/usr/bin/env bash | ||
| set -xe | ||
|
|
||
| # Modify the buck2/**/.buckconfig files to set the test cluster to opal. | ||
| find ./ -type f -name '.buckconfig' -exec sed -i 's/<CLUSTER_NAME>/opal/g' {} \; | ||
|
|
||
| # Modify the buck2/**/.buckconfig files to set the "Authorization=Bearer $GITHUB_TOKEN" in the http_headers. | ||
| find ./ -type f -name '.buckconfig' -exec sed -i 's/<AUTH_HTTP_HEADERS>/Authorization:Bearer $GITHUB_TOKEN/g' {} \; | ||
|
|
This file contains hidden or 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,12 @@ | ||
| #!/usr/bin/env bash | ||
| set -xe | ||
|
|
||
| # Get the Buck2 binary. | ||
| curl -L -O https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-musl.zst | ||
|
|
||
| # Unpack the binary. | ||
| unzstd buck2-x86_64-unknown-linux-musl.zst | ||
|
|
||
| # Change its name and make it executable. | ||
| mv buck2-x86_64-unknown-linux-musl buck2-exe | ||
| chmod +x buck2-exe |
This file contains hidden or 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,23 @@ | ||
| #!/usr/bin/env bash | ||
| set -xe | ||
| shopt -s expand_aliases | ||
|
|
||
| alias buck2="$(realpath buck2-exe)" | ||
|
|
||
| # Run cpp example | ||
| cd buck2/cpp | ||
| buck2 build //:cpp_lib | ||
| buck2 test //:cpp_test | ||
| cd .. | ||
|
|
||
| # Run python example | ||
| cd python | ||
| buck2 build //main:check_main | ||
| buck2 test //hello:hello_unittest_test | ||
| cd .. | ||
|
|
||
| # Run go example | ||
| cd golang | ||
| buck2 build //go:hello | ||
| buck2 test //go/greeting:greeting_test | ||
| cd .. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could have also used a function FYI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I will consider that option in the general case. In this case I think using a function might be too much, but if the script starts getting more complex as we add more samples I will switch to using a function.