forked from facebook/buck2
-
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.
- Loading branch information
Adam Singer
authored and
github-actions
committed
Aug 2, 2024
1 parent
d9440da
commit 02b008b
Showing
13 changed files
with
178 additions
and
344 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: build_example_nativelink | ||
inputs: | ||
NATIVELINK_ENGINE_ADDRESS_SECRET: | ||
description: '' | ||
required: true | ||
NATIVELINK_AC_ADDRESS_SECRET: | ||
description: '' | ||
required: true | ||
NATIVELINK_CAS_ADDRESS_SECRET: | ||
description: '' | ||
required: true | ||
NATIVELINK_HEADER_RW_KEY_SECRET: | ||
description: '' | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Build examples/remote_execution/nativelink directory | ||
run: |- | ||
sed -i'' -e "s|NATIVELINK_ENGINE_ADDRESS|$NATIVELINK_ENGINE_ADDRESS|" \ | ||
-e "s|NATIVELINK_AC_ADDRESS|$NATIVELINK_AC_ADDRESS|" \ | ||
-e "s|NATIVELINK_CAS_ADDRESS|$NATIVELINK_CAS_ADDRESS|" \ | ||
-e "s|NATIVELINK_HEADER_RW_KEY|$NATIVELINK_HEADER_RW_KEY|" \ | ||
examples/remote_execution/nativelink/.buckconfig | ||
cd examples/remote_execution/nativelink | ||
$RUNNER_TEMP/artifacts/buck2 build //... -v 4 | ||
env: | ||
NATIVELINK_ENGINE_ADDRESS: ${{ inputs.NATIVELINK_ENGINE_ADDRESS_SECRET }} | ||
NATIVELINK_AC_ADDRESS: ${{ inputs.NATIVELINK_AC_ADDRESS_SECRET }} | ||
NATIVELINK_CAS_ADDRESS: ${{ inputs.NATIVELINK_CAS_ADDRESS_SECRET }} | ||
NATIVELINK_HEADER_RW_KEY: ${{ inputs.NATIVELINK_HEADER_RW_KEY_SECRET }} | ||
shell: bash |
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,9 +1,32 @@ | ||
name: build_example_no_prelude | ||
inputs: | ||
NATIVELINK_ENGINE_ADDRESS_SECRET: | ||
description: '' | ||
required: true | ||
NATIVELINK_AC_ADDRESS_SECRET: | ||
description: '' | ||
required: true | ||
NATIVELINK_CAS_ADDRESS_SECRET: | ||
description: '' | ||
required: true | ||
NATIVELINK_HEADER_RW_KEY_SECRET: | ||
description: '' | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Build example/no_prelude directory | ||
run: |- | ||
sed -i'' -e "s|NATIVELINK_ENGINE_ADDRESS|$NATIVELINK_ENGINE_ADDRESS|" \ | ||
-e "s|NATIVELINK_AC_ADDRESS|$NATIVELINK_AC_ADDRESS|" \ | ||
-e "s|NATIVELINK_CAS_ADDRESS|$NATIVELINK_CAS_ADDRESS|" \ | ||
-e "s|NATIVELINK_HEADER_RW_KEY|$NATIVELINK_HEADER_RW_KEY|" \ | ||
examples/no_prelude/.buckconfig | ||
cd examples/no_prelude | ||
$RUNNER_TEMP/artifacts/buck2 build //... -v 2 | ||
$RUNNER_TEMP/artifacts/buck2 build //... -v 4 | ||
env: | ||
NATIVELINK_ENGINE_ADDRESS: ${{ inputs.NATIVELINK_ENGINE_ADDRESS_SECRET }} | ||
NATIVELINK_AC_ADDRESS: ${{ inputs.NATIVELINK_AC_ADDRESS_SECRET }} | ||
NATIVELINK_CAS_ADDRESS: ${{ inputs.NATIVELINK_CAS_ADDRESS_SECRET }} | ||
NATIVELINK_HEADER_RW_KEY: ${{ inputs.NATIVELINK_HEADER_RW_KEY_SECRET }} | ||
shell: bash |
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,93 +1,31 @@ | ||
name: Build and test | ||
name: Build and test nativelink | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
workflow_call: | ||
workflow_run: | ||
workflows: ["rebase upstream manual", "rebase upstream cron"] | ||
types: | ||
- completed | ||
jobs: | ||
linux-build-and-test: | ||
runs-on: 4-core-ubuntu | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/setup_linux_env | ||
- uses: ./.github/actions/build_debug | ||
- uses: ./.github/actions/run_test_py | ||
macos-build-and-test: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: 15.3.0 | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/setup_macos_env | ||
- uses: ./.github/actions/build_debug | ||
- uses: ./.github/actions/run_test_py | ||
windows-build-and-test: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/setup_windows_env | ||
- uses: ./.github/actions/build_debug | ||
- uses: ./.github/actions/run_test_py | ||
macos-build-examples: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: 15.3.0 | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/setup_macos_env | ||
- uses: ./.github/actions/init_opam | ||
- uses: ./.github/actions/build_release | ||
- name: Setup the 'example/with_prelude' project | ||
run: |- | ||
cd examples/with_prelude | ||
./haskell-setup.sh | ||
./ocaml-setup.sh | ||
- name: Build the 'example/with_prelude' project | ||
run: |- | ||
cd examples/with_prelude | ||
$RUNNER_TEMP/artifacts/buck2 build //... -v 2 | ||
$RUNNER_TEMP/artifacts/buck2 test //... -v 2 | ||
- uses: ./.github/actions/build_example_no_prelude | ||
- uses: ./.github/actions/setup_reindeer | ||
- uses: ./.github/actions/build_bootstrap | ||
linux-build-examples: | ||
runs-on: ubuntu-latest | ||
runs-on: xlarge-ubuntu-x86-22.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/setup_linux_env | ||
- uses: ./.github/actions/init_opam | ||
- uses: ./.github/actions/build_release | ||
- name: Setup the 'example/with_prelude' project | ||
run: |- | ||
cd examples/with_prelude | ||
./haskell-setup.sh | ||
./ocaml-setup.sh | ||
- name: Build the 'example/with_prelude' project | ||
run: |- | ||
cd examples/with_prelude | ||
$RUNNER_TEMP/artifacts/buck2 build //... -v 2 | ||
$RUNNER_TEMP/artifacts/buck2 test //... -v 2 | ||
- uses: ./.github/actions/build_example_conan | ||
- uses: ./.github/actions/build_debug | ||
- uses: ./.github/actions/build_example_nativelink | ||
with: | ||
NATIVELINK_ENGINE_ADDRESS_SECRET: ${{ secrets.NATIVELINK_ENGINE_ADDRESS_SECRET }} | ||
NATIVELINK_AC_ADDRESS_SECRET: ${{ secrets.NATIVELINK_AC_ADDRESS_SECRET }} | ||
NATIVELINK_CAS_ADDRESS_SECRET: ${{ secrets.NATIVELINK_CAS_ADDRESS_SECRET }} | ||
NATIVELINK_HEADER_RW_KEY_SECRET: ${{ secrets.NATIVELINK_HEADER_RW_KEY_SECRET }} | ||
- uses: ./.github/actions/build_example_no_prelude | ||
with: | ||
NATIVELINK_ENGINE_ADDRESS_SECRET: ${{ secrets.NATIVELINK_ENGINE_ADDRESS_SECRET }} | ||
NATIVELINK_AC_ADDRESS_SECRET: ${{ secrets.NATIVELINK_AC_ADDRESS_SECRET }} | ||
NATIVELINK_CAS_ADDRESS_SECRET: ${{ secrets.NATIVELINK_CAS_ADDRESS_SECRET }} | ||
NATIVELINK_HEADER_RW_KEY_SECRET: ${{ secrets.NATIVELINK_HEADER_RW_KEY_SECRET }} | ||
- uses: ./.github/actions/setup_reindeer | ||
- uses: ./.github/actions/build_bootstrap | ||
windows-build-examples: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/setup_windows_env | ||
- uses: ./.github/actions/build_release | ||
- name: Build example/prelude directory | ||
run: |- | ||
cd examples/with_prelude | ||
& $Env:RUNNER_TEMP/artifacts/buck2 build //... -v 2 | ||
& $Env:RUNNER_TEMP/artifacts/buck2 test //... -v 2 | ||
- uses: ./.github/actions/build_example_no_prelude | ||
- name: Configure CARGO_HOME | ||
run: |- | ||
echo CARGO_HOME=$GITHUB_WORKSPACE/.cargo >> $GITHUB_ENV | ||
echo $GITHUB_WORKSPACE/.cargo/bin >> $GITHUB_PATH | ||
shell: | ||
bash | ||
- uses: ./.github/actions/setup_reindeer | ||
- uses: ./.github/actions/build_bootstrap |
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,24 @@ | ||
name: rebase upstream cron | ||
on: | ||
schedule: | ||
- cron: '*/180 * * * *' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Rebase | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "github-actions" | ||
git remote add upstream http://github.com/facebook/buck2.git | ||
git fetch upstream | ||
git rebase upstream/main | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
force_with_lease: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} |
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,22 @@ | ||
name: rebase upstream manual | ||
on: workflow_dispatch | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Rebase | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "github-actions" | ||
git remote add upstream http://github.com/facebook/buck2.git | ||
git fetch upstream | ||
git rebase upstream/main | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
force_with_lease: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} |
Oops, something went wrong.