Commit 5631c7b2 authored by Wez Furlong's avatar Wez Furlong Committed by Facebook GitHub Bot

getdeps: fixup python3 usage on GitHub Actions CI

Summary:
My recent change to ensure that we were using python3 to launch everything failed on windows: the GH actions environment has `python.exe` in the path and it is python version 3.  There is no such thing as `python3` in that environment, although there is a `python2`.

Refs: https://github.com/facebook/watchman/pull/797

Reviewed By: chadaustin

Differential Revision: D20740411

fbshipit-source-id: 0e40590ccedc18e327ebb84901e2509588fdd0ff
parent 278c88d5
......@@ -138,68 +138,68 @@ jobs:
- name: Fix Git config
run: git config --system core.longpaths true
- name: Fetch boost
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests boost
run: python build/fbcode_builder/getdeps.py fetch --no-tests boost
- name: Fetch perl
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests perl
run: python build/fbcode_builder/getdeps.py fetch --no-tests perl
- name: Fetch openssl
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests openssl
run: python build/fbcode_builder/getdeps.py fetch --no-tests openssl
- name: Fetch ninja
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests ninja
run: python build/fbcode_builder/getdeps.py fetch --no-tests ninja
- name: Fetch cmake
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests cmake
run: python build/fbcode_builder/getdeps.py fetch --no-tests cmake
- name: Fetch double-conversion
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests double-conversion
run: python build/fbcode_builder/getdeps.py fetch --no-tests double-conversion
- name: Fetch fmt
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests fmt
run: python build/fbcode_builder/getdeps.py fetch --no-tests fmt
- name: Fetch gflags
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests gflags
run: python build/fbcode_builder/getdeps.py fetch --no-tests gflags
- name: Fetch glog
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests glog
run: python build/fbcode_builder/getdeps.py fetch --no-tests glog
- name: Fetch googletest
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests googletest
run: python build/fbcode_builder/getdeps.py fetch --no-tests googletest
- name: Fetch libevent
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests libevent
run: python build/fbcode_builder/getdeps.py fetch --no-tests libevent
- name: Fetch snappy
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests snappy
run: python build/fbcode_builder/getdeps.py fetch --no-tests snappy
- name: Fetch zlib
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests zlib
run: python build/fbcode_builder/getdeps.py fetch --no-tests zlib
- name: Fetch zstd
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests zstd
run: python build/fbcode_builder/getdeps.py fetch --no-tests zstd
- name: Build boost
run: python3 build/fbcode_builder/getdeps.py build --no-tests boost
run: python build/fbcode_builder/getdeps.py build --no-tests boost
- name: Build perl
run: python3 build/fbcode_builder/getdeps.py build --no-tests perl
run: python build/fbcode_builder/getdeps.py build --no-tests perl
- name: Build openssl
run: python3 build/fbcode_builder/getdeps.py build --no-tests openssl
run: python build/fbcode_builder/getdeps.py build --no-tests openssl
- name: Build ninja
run: python3 build/fbcode_builder/getdeps.py build --no-tests ninja
run: python build/fbcode_builder/getdeps.py build --no-tests ninja
- name: Build cmake
run: python3 build/fbcode_builder/getdeps.py build --no-tests cmake
run: python build/fbcode_builder/getdeps.py build --no-tests cmake
- name: Build double-conversion
run: python3 build/fbcode_builder/getdeps.py build --no-tests double-conversion
run: python build/fbcode_builder/getdeps.py build --no-tests double-conversion
- name: Build fmt
run: python3 build/fbcode_builder/getdeps.py build --no-tests fmt
run: python build/fbcode_builder/getdeps.py build --no-tests fmt
- name: Build gflags
run: python3 build/fbcode_builder/getdeps.py build --no-tests gflags
run: python build/fbcode_builder/getdeps.py build --no-tests gflags
- name: Build glog
run: python3 build/fbcode_builder/getdeps.py build --no-tests glog
run: python build/fbcode_builder/getdeps.py build --no-tests glog
- name: Build googletest
run: python3 build/fbcode_builder/getdeps.py build --no-tests googletest
run: python build/fbcode_builder/getdeps.py build --no-tests googletest
- name: Build libevent
run: python3 build/fbcode_builder/getdeps.py build --no-tests libevent
run: python build/fbcode_builder/getdeps.py build --no-tests libevent
- name: Build snappy
run: python3 build/fbcode_builder/getdeps.py build --no-tests snappy
run: python build/fbcode_builder/getdeps.py build --no-tests snappy
- name: Build zlib
run: python3 build/fbcode_builder/getdeps.py build --no-tests zlib
run: python build/fbcode_builder/getdeps.py build --no-tests zlib
- name: Build zstd
run: python3 build/fbcode_builder/getdeps.py build --no-tests zstd
run: python build/fbcode_builder/getdeps.py build --no-tests zstd
- name: Build folly
run: python3 build/fbcode_builder/getdeps.py build --src-dir=. folly
run: python build/fbcode_builder/getdeps.py build --src-dir=. folly
- name: Copy artifacts
run: python3 build/fbcode_builder/getdeps.py fixup-dyn-deps --src-dir=. folly _artifacts/windows
run: python build/fbcode_builder/getdeps.py fixup-dyn-deps --src-dir=. folly _artifacts/windows
- uses: actions/upload-artifact@master
with:
name: folly
path: _artifacts
- name: Test folly
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. folly
run: python build/fbcode_builder/getdeps.py test --src-dir=. folly
......@@ -610,6 +610,13 @@ jobs:
if manifest.get("build", "builder", ctx=manifest_ctx) == "nop":
return None
# We want to be sure that we're running things with python 3
# but python versioning is honestly a bit of a frustrating mess.
# `python` may be version 2 or version 3 depending on the system.
# python3 may not be a thing at all!
# Assume an optimistic default
py3 = "python3"
if build_opts.is_linux():
job_name = "linux"
runs_on = "ubuntu-18.04"
......@@ -620,10 +627,15 @@ jobs:
# buildable with Visual Studio 2019
job_name = "windows"
runs_on = "windows-2016"
# The windows runners are python 3 by default; python2.exe
# is available if needed.
py3 = "python"
else:
job_name = "mac"
runs_on = "macOS-latest"
getdeps = f"{py3} build/fbcode_builder/getdeps.py"
out.write(" %s:\n" % job_name)
out.write(" runs-on: %s\n" % runs_on)
out.write(" steps:\n")
......@@ -640,29 +652,20 @@ jobs:
for m in projects:
if m != manifest:
out.write(" - name: Fetch %s\n" % m.name)
out.write(
" run: python3 build/fbcode_builder/getdeps.py fetch "
"--no-tests %s\n" % m.name
)
out.write(f" run: {getdeps} fetch --no-tests {m.name}\n")
for m in projects:
if m != manifest:
out.write(" - name: Build %s\n" % m.name)
out.write(
" run: python3 build/fbcode_builder/getdeps.py build "
"--no-tests %s\n" % m.name
)
out.write(f" run: {getdeps} build --no-tests {m.name}\n")
out.write(" - name: Build %s\n" % manifest.name)
out.write(
" run: python3 build/fbcode_builder/getdeps.py build --src-dir=. %s\n"
% manifest.name
)
out.write(f" run: {getdeps} build --src-dir=. {manifest.name}\n")
out.write(" - name: Copy artifacts\n")
out.write(
" run: python3 build/fbcode_builder/getdeps.py fixup-dyn-deps "
"--src-dir=. %s _artifacts/%s\n" % (manifest.name, job_name)
f" run: {getdeps} fixup-dyn-deps "
f"--src-dir=. {manifest.name} _artifacts/{job_name}\n"
)
out.write(" - uses: actions/upload-artifact@master\n")
out.write(" with:\n")
......@@ -670,10 +673,7 @@ jobs:
out.write(" path: _artifacts\n")
out.write(" - name: Test %s\n" % manifest.name)
out.write(
" run: python3 build/fbcode_builder/getdeps.py test --src-dir=. %s\n"
% manifest.name
)
out.write(f" run: {getdeps} test --src-dir=. {manifest.name}\n")
def setup_project_cmd_parser(self, parser):
parser.add_argument("--output-file", help="The name of the yaml file")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment