diff --git a/.github/workflows/edenscm_linux.yml b/.github/workflows/edenscm_linux.yml new file mode 100644 index 0000000000000..fb3f76df196a3 --- /dev/null +++ b/.github/workflows/edenscm_linux.yml @@ -0,0 +1,161 @@ +# This file was @generated by getdeps.py + +name: EdenSCM Linux + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Show disk space at start + run: df -h + - name: Free up disk space + run: sudo rm -rf "$AGENT_TOOLSDIRECTORY" /usr/local/lib/android + - name: Show disk space after freeing up + run: df -h + - name: Update system package info + run: sudo apt-get update + - name: Install system deps + run: sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive sapling + - name: Install Rust Stable + uses: dtolnay/rust-toolchain@stable + - name: Fetch bz2 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests bz2 + - name: Fetch ninja + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests ninja + - name: Fetch cmake + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests cmake + - name: Fetch fmt + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fmt + - name: Fetch googletest + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests googletest + - name: Fetch python-six + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests python-six + - name: Fetch zstd + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests zstd + - name: Fetch boost + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests boost + - name: Fetch double-conversion + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests double-conversion + - name: Fetch gflags + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests gflags + - name: Fetch glog + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests glog + - name: Fetch libevent + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libevent + - name: Fetch lz4 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests lz4 + - name: Fetch snappy + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests snappy + - name: Fetch zlib + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests zlib + - name: Fetch autoconf + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests autoconf + - name: Fetch automake + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests automake + - name: Fetch libtool + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libtool + - name: Fetch libffi + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libffi + - name: Fetch ncurses + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests ncurses + - name: Fetch python + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests python + - name: Fetch libsodium + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libsodium + - name: Fetch xz + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests xz + - name: Fetch folly + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests folly + - name: Fetch fizz + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fizz + - name: Fetch mvfst + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests mvfst + - name: Fetch wangle + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests wangle + - name: Fetch fbthrift + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fbthrift + - name: Fetch fb303 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fb303 + - name: Fetch rust-shed + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests rust-shed + - name: Build bz2 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests bz2 + - name: Build ninja + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests ninja + - name: Build cmake + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests cmake + - name: Build fmt + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests fmt + - name: Build googletest + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests googletest + - name: Build python-six + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests python-six + - name: Build zstd + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests zstd + - name: Build boost + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests boost + - name: Build double-conversion + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests double-conversion + - name: Build gflags + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests gflags + - name: Build glog + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests glog + - name: Build libevent + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests libevent + - name: Build lz4 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests lz4 + - name: Build snappy + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests snappy + - name: Build zlib + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests zlib + - name: Build autoconf + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests autoconf + - name: Build automake + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests automake + - name: Build libtool + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests libtool + - name: Build libffi + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests libffi + - name: Build ncurses + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests ncurses + - name: Build python + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests python + - name: Build libsodium + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests libsodium + - name: Build xz + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests xz + - name: Build folly + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests folly + - name: Build fizz + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests fizz + - name: Build mvfst + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests mvfst + - name: Build wangle + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests wangle + - name: Build fbthrift + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests fbthrift + - name: Build fb303 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests fb303 + - name: Build rust-shed + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests rust-shed + - name: Build sapling + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. sapling --project-install-prefix sapling:/usr/local + - name: Copy artifacts + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fixup-dyn-deps --strip --src-dir=. sapling _artifacts/linux --project-install-prefix sapling:/usr/local --final-install-prefix /usr/local + - uses: actions/upload-artifact@v2 + with: + name: sapling + path: _artifacts + - name: Test sapling + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. sapling --project-install-prefix sapling:/usr/local + - name: Show disk space at end + run: df -h diff --git a/.github/workflows/edenscm_mac.yml b/.github/workflows/edenscm_mac.yml new file mode 100644 index 0000000000000..66956c643c115 --- /dev/null +++ b/.github/workflows/edenscm_mac.yml @@ -0,0 +1,155 @@ +# This file was @generated by getdeps.py + +name: EdenSCM Mac + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v2 + - name: Install system deps + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive eden_scm + - name: Fetch openssl + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests openssl + - name: Install Rust Stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + default: true + profile: minimal + - name: Fetch bz2 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests bz2 + - name: Fetch ninja + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests ninja + - name: Fetch cmake + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests cmake + - name: Fetch fmt + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fmt + - name: Fetch googletest + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests googletest + - name: Fetch python-six + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests python-six + - name: Fetch zstd + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests zstd + - name: Fetch boost + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests boost + - name: Fetch double-conversion + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests double-conversion + - name: Fetch gflags + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests gflags + - name: Fetch glog + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests glog + - name: Fetch libevent + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libevent + - name: Fetch lz4 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests lz4 + - name: Fetch snappy + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests snappy + - name: Fetch zlib + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests zlib + - name: Fetch autoconf + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests autoconf + - name: Fetch automake + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests automake + - name: Fetch libtool + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libtool + - name: Fetch libffi + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libffi + - name: Fetch ncurses + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests ncurses + - name: Fetch python + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests python + - name: Fetch libsodium + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libsodium + - name: Fetch xz + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests xz + - name: Fetch folly + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests folly + - name: Fetch fizz + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fizz + - name: Fetch wangle + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests wangle + - name: Fetch fbthrift + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fbthrift + - name: Fetch fb303 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fb303 + - name: Fetch rust-shed + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests rust-shed + - name: Build openssl + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests openssl + - name: Build bz2 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests bz2 + - name: Build ninja + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests ninja + - name: Build cmake + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests cmake + - name: Build fmt + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fmt + - name: Build googletest + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests googletest + - name: Build python-six + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests python-six + - name: Build zstd + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests zstd + - name: Build boost + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests boost + - name: Build double-conversion + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests double-conversion + - name: Build gflags + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests gflags + - name: Build glog + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests glog + - name: Build libevent + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libevent + - name: Build lz4 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests lz4 + - name: Build snappy + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests snappy + - name: Build zlib + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests zlib + - name: Build autoconf + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests autoconf + - name: Build automake + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests automake + - name: Build libtool + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libtool + - name: Build libffi + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libffi + - name: Build ncurses + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests ncurses + - name: Build python + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests python + - name: Build libsodium + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libsodium + - name: Build xz + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests xz + - name: Build folly + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests folly + - name: Build fizz + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fizz + - name: Build wangle + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests wangle + - name: Build fbthrift + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fbthrift + - name: Build fb303 + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fb303 + - name: Build rust-shed + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests rust-shed + - name: Build eden_scm + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. eden_scm --project-install-prefix eden_scm:/usr/local + - name: Copy artifacts + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fixup-dyn-deps --src-dir=. eden_scm _artifacts/mac --project-install-prefix eden_scm:/usr/local --final-install-prefix /usr/local + - uses: actions/upload-artifact@v2 + with: + name: eden_scm + path: _artifacts + - name: Test eden_scm + run: python3 build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. eden_scm --project-install-prefix eden_scm:/usr/local diff --git a/build/fbcode_builder/manifests/sapling b/build/fbcode_builder/manifests/sapling new file mode 100644 index 0000000000000..a146b1ac8ac2c --- /dev/null +++ b/build/fbcode_builder/manifests/sapling @@ -0,0 +1,68 @@ +[manifest] +name = sapling +fbsource_path = fbcode/eden +shipit_project = eden +shipit_fbcode_builder = true + +[git] +repo_url = https://github.com/facebook/sapling.git + +[build.not(os=windows)] +builder = make +subdir = eden/scm + +[build.os=windows] +# For now the biggest blocker is missing "make" on windows, but there are bound +# to be more +builder = nop + +[make.build_args] +getdepsbuild + +[make.install_args] +install-getdeps + +[make.test_args] +test-getdeps + +[shipit.pathmap] +fbcode/configerator/structs/scm/hg = configerator/structs/scm/hg +fbcode/configerator/structs/scm/hg/public_autocargo = configerator/structs/scm/hg +fbcode/eden/oss = . +fbcode/eden = eden +fbcode/eden/fs/public_autocargo = eden/fs +fbcode/eden/mononoke/public_autocargo = eden/mononoke +fbcode/eden/scm/public_autocargo = eden/scm +fbcode/tools/lfs = tools/lfs + +[shipit.strip] +^fbcode/configerator/structs/scm/hg(?!/public_autocargo).*/Cargo\.toml$ +^fbcode/eden/addons/.*$ +^fbcode/eden/fs/eden-config\.h$ +^fbcode/eden/fs/py/eden/config\.py$ +^fbcode/eden/hg-server/.*$ +^fbcode/eden/fs(?!/public_autocargo).*/Cargo\.toml$ +^fbcode/eden/mononoke(?!/public_autocargo).*/Cargo\.toml$ +^fbcode/eden/scm(?!/public_autocargo|/edenscmnative/bindings).*/Cargo\.toml$ +^fbcode/eden/scm/build/.*$ +^fbcode/eden/website/.*$ +^fbcode/eden/.*/\.cargo/.*$ +^.*/facebook/.*$ +^.*/fb/.*$ +/Cargo\.lock$ +\.pyc$ + +[dependencies] +fb303 +fbthrift +rust-shed + +[dependencies.not(os=windows)] +python + +# We use the system openssl on linux +[dependencies.not(os=linux)] +openssl + +[dependencies.fbsource=on] +rust diff --git a/eden/scm/Makefile b/eden/scm/Makefile index 7f5e17b0c27ca..215c08330672c 100644 --- a/eden/scm/Makefile +++ b/eden/scm/Makefile @@ -163,6 +163,12 @@ install-getdeps: getdepsbuild GETDEPS_BUILD=1 $(shell $(PYTHON3) contrib/pick_python.py $(PYTHON3)) \ setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --install-lib="$(PREFIX)/bin" --force +test-getdeps: install-getdeps + # Run one test to check the binary is minimally good as will be used later in Mononoke getdeps tests + # Running all the tests requires a bit of filtering to run the good set (or deleting flaky ones) + cd tests && PYTHON_SYS_EXECUTABLE=$(shell $(PYTHON3) contrib/pick_python.py $(PYTHON3)) \ + $(shell $(PYTHON3) contrib/pick_python.py $(PYTHON3)) run-tests.py -j1 --getdeps-build --with-hg="$(PREFIX)/bin/$(HGNAME)" test-status.t test-convert.t + check: tests .PHONY: tests