-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Mononoke integration tests CI (#26)
Summary: This diff adds a minimal workflow for running integrations tests for Mononoke. Currently only one test is run and it fails. This also splits the regular Mononoke CI into separate files for Linux and Mac to match the current style in Eden repo. There are the "scopeguard::defer" fixes here that somehow escaped the CI tests. Some tweaks have been made to "integration_runner_real.py" to make it runnable outside FB context. Lastly the change from using "[[ -v ... ]" to "[[ -n "${...:-}" ]]; in "library.sh" was made because the former is not supported by the default Bash version preinstalled on modern MacOS. Pull Request resolved: #26 Reviewed By: krallin Differential Revision: D22541344 Pulled By: lukaspiatkowski fbshipit-source-id: 5023d147823166a8754be852c29b1e7b0e6d9f5f
- Loading branch information
1 parent
9d2a577
commit 0dd3c4e
Showing
13 changed files
with
448 additions
and
165 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,80 @@ | ||
name: Mononoke Integration Tests Linux | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Check space | ||
run: df -h | ||
- name: Clean space as per https://github.com/actions/virtual-environments/issues/709 | ||
run: sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Check space | ||
run: df -h | ||
- name: Install Rust Stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
default: true | ||
profile: minimal | ||
- name: Install Python 2.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '2.7' | ||
- name: Install system deps | ||
run: sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive eden_scm | ||
- name: Build eden_scm dependencies | ||
run: >- | ||
python3 build/fbcode_builder/getdeps.py build | ||
--allow-system-packages | ||
--scratch-path /tmp/build | ||
--only-deps | ||
--src-dir=. | ||
eden_scm | ||
- name: Build eden_scm | ||
run: >- | ||
python3 build/fbcode_builder/getdeps.py build | ||
--allow-system-packages | ||
--scratch-path /tmp/build | ||
--no-deps | ||
--src-dir=. | ||
eden_scm | ||
- name: Build mononoke dependencies | ||
run: >- | ||
python3 build/fbcode_builder/getdeps.py build | ||
--scratch-path /tmp/build | ||
--only-deps | ||
--src-dir=. | ||
mononoke | ||
- name: Build mononoke | ||
run: >- | ||
python3 build/fbcode_builder/getdeps.py build | ||
--scratch-path /tmp/build | ||
--no-deps | ||
--src-dir=. | ||
mononoke | ||
- name: Install Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install click | ||
- name: Check space | ||
run: df -h | ||
- name: Run Monononke integration tests | ||
run: | | ||
for dir in /tmp/build/installed/python-click-*/lib/fb-py-libs/python-click/click; do | ||
export PYTHONPATH="${dir}${PYTHONPATH:+:${PYTHONPATH}}" | ||
done | ||
python3 eden/mononoke/tests/integration/run_tests_getdeps.py /tmp/build/installed /tmp/build/build/mononoke_integration_test | ||
continue-on-error: true |
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,78 @@ | ||
name: Mononoke Integration Tests Mac | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
runs-on: macOS-latest | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_10.3.app/Contents/Developer | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Check space | ||
run: df -h | ||
- name: Install Rust Stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
default: true | ||
profile: minimal | ||
- name: Install Python 2.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '2.7' | ||
- name: Install system deps | ||
run: sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive eden_scm | ||
- name: Build eden_scm dependencies | ||
run: >- | ||
python3 build/fbcode_builder/getdeps.py build | ||
--allow-system-packages | ||
--scratch-path /tmp/build | ||
--only-deps | ||
--src-dir=. | ||
eden_scm | ||
- name: Build eden_scm | ||
run: >- | ||
python3 build/fbcode_builder/getdeps.py build | ||
--allow-system-packages | ||
--scratch-path /tmp/build | ||
--no-deps | ||
--src-dir=. | ||
eden_scm | ||
- name: Build mononoke dependencies | ||
run: >- | ||
python3 build/fbcode_builder/getdeps.py build | ||
--scratch-path /tmp/build | ||
--only-deps | ||
--src-dir=. | ||
mononoke | ||
- name: Build mononoke | ||
run: >- | ||
python3 build/fbcode_builder/getdeps.py build | ||
--scratch-path /tmp/build | ||
--no-deps | ||
--src-dir=. | ||
mononoke | ||
- name: Install Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install click | ||
- name: Check space | ||
run: df -h | ||
- name: Run Monononke integration tests | ||
run: | | ||
for dir in /tmp/build/installed/python-click-*/lib/fb-py-libs/python-click/click; do | ||
export PYTHONPATH="${dir}${PYTHONPATH:+:${PYTHONPATH}}" | ||
done | ||
python3 eden/mononoke/tests/integration/run_tests_getdeps.py /tmp/build/installed /tmp/build/build/mononoke_integration_test | ||
continue-on-error: true |
This file was deleted.
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Mononoke Linux | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Check space | ||
run: df -h | ||
- name: Clean space as per https://github.com/actions/virtual-environments/issues/709 | ||
run: sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Check space | ||
run: df -h | ||
- name: Install Rust Stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
default: true | ||
profile: minimal | ||
- name: Build dependencies | ||
run: python3 build/fbcode_builder/getdeps.py build --only-deps --src-dir=. mononoke | ||
- name: Build mononoke | ||
run: python3 build/fbcode_builder/getdeps.py build --no-deps --src-dir=. mononoke | ||
- name: Check space | ||
run: df -h | ||
- name: Test mononoke | ||
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. mononoke | ||
- name: Check space | ||
run: df -h | ||
- name: Install Rust Beta | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: beta | ||
default: true | ||
profile: minimal | ||
- name: Test mononoke with beta toolchain | ||
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. mononoke | ||
continue-on-error: true | ||
- name: Install Rust Nightly | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
default: true | ||
profile: minimal | ||
- name: Test mononoke with nightly toolchain | ||
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. mononoke | ||
continue-on-error: true | ||
- name: Check space | ||
run: df -h |
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,55 @@ | ||
name: Mononoke Mac | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: macOS-latest | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_10.3.app/Contents/Developer | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Check space | ||
run: df -h | ||
- name: Install Rust Stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
default: true | ||
profile: minimal | ||
- name: Build dependencies | ||
run: python3 build/fbcode_builder/getdeps.py build --only-deps --src-dir=. mononoke | ||
- name: Build mononoke | ||
run: python3 build/fbcode_builder/getdeps.py build --no-deps --src-dir=. mononoke | ||
- name: Check space | ||
run: df -h | ||
- name: Test mononoke | ||
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. mononoke | ||
- name: Check space | ||
run: df -h | ||
- name: Install Rust Beta | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: beta | ||
default: true | ||
profile: minimal | ||
- name: Test mononoke with beta toolchain | ||
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. mononoke | ||
continue-on-error: true | ||
- name: Install Rust Nightly | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
default: true | ||
profile: minimal | ||
- name: Test mononoke with nightly toolchain | ||
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. mononoke | ||
continue-on-error: true | ||
- name: Check space | ||
run: df -h |
Oops, something went wrong.