Skip to content

Commit

Permalink
restore sapling getdeps build for eden fs tests
Browse files Browse the repository at this point in the history
Bring it back so we can to test eden fs as its tests need the hg binary and thus the sapling manifest to depend upon

Outside of eden fs, this build is useful to allow change to thrift files as it runs thrift compiler rather than using pre-compiled thrift output.

Started with backout of 73302ef and badf6d1, and then generated actions with:
`./build/fbcode_builder/getdeps.py --allow-system-packages generate-github-actions --free-up-disk --os-type=linux --src-dir=. --output-dir=.github/workflows --job-name "EdenSCM " --job-file-prefix=edenscm_ sapling`

Test plan:

Build locally with: `./build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --src-dir=. sapling`

CI
  • Loading branch information
ahornby committed Oct 7, 2023
1 parent 5bd0e77 commit 748e43f
Show file tree
Hide file tree
Showing 4 changed files with 390 additions and 0 deletions.
161 changes: 161 additions & 0 deletions .github/workflows/edenscm_linux.yml
Original file line number Diff line number Diff line change
@@ -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
155 changes: 155 additions & 0 deletions .github/workflows/edenscm_mac.yml
Original file line number Diff line number Diff line change
@@ -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
68 changes: 68 additions & 0 deletions build/fbcode_builder/manifests/sapling
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 748e43f

Please sign in to comment.