Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(macos): build with python 3.9 #45

Merged
merged 1 commit into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,12 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
target: '//zetasql/parser/...'
build_argv: '--features=-supports_dynamic_linker '

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
centos-build:
runs-on: ubuntu-latest
container:
image: ghcr.io/aceforeverd/hybridsql-base:0.4.0
env:
BAZEL_LINKOPTS: '-static-libstdc++:-lm'
BAZEL_LINKLIBS: '-l%:libstdc++.a'
build_argv: '--features=-supports_dynamic_linker '
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -79,7 +71,7 @@ jobs:

- uses: actions/checkout@v3

- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'adopt' # See 'Supported distributions' for available options
java-version: '8'
Expand Down Expand Up @@ -118,14 +110,18 @@ jobs:
runs-on: macos-latest
timeout-minutes: 120
env:
build_argv: '--features=-supports_dynamic_linker '
bazel_version: '3.7.2'
steps:
- uses: actions/checkout@v3

- name: update bazel version
run: echo ${{ env.bazel_version }} > .bazelversion

- name: setup python3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: install bazelisk
run: |
brew install bazelisk
Expand Down
16 changes: 9 additions & 7 deletions build_zetasql_parser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,20 @@ if [[ $(arch) = 'aarch64' ]]; then
git apply --verbose aarch64.patch
fi

echo "build with python: $(python -V), python3: $(python3 -V)"

TARGET='//zetasql/parser/...'
BUILD_ARGV='--features=-supports_dynamic_linker'
BUILD_ARGV=(--features=-supports_dynamic_linker --sandbox_debug)

bazel build "$TARGET" "$BUILD_ARGV"
bazel test "$TARGET" "$BUILD_ARGV"
bazel build "$TARGET" "${BUILD_ARGV[@]}"
bazel test "$TARGET" "${BUILD_ARGV[@]}"

# explicitly build dependencies into static library
bazel clean
bazel query "deps(//zetasql/parser:parser)" | grep //zetasql | xargs bazel build "$BUILD_ARGV"
bazel build "@com_googleapis_googleapis//:all" "$BUILD_ARGV"
bazel query "@com_google_file_based_test_driver//..." | xargs bazel build "$BUILD_ARGV"
bazel build "@com_googlesource_code_re2//:re2" "$BUILD_ARGV"
bazel query "deps(//zetasql/parser:parser)" | grep //zetasql | xargs bazel build "${BUILD_ARGV[@]}"
bazel build "@com_googleapis_googleapis//:all" "${BUILD_ARGV[@]}"
bazel query "@com_google_file_based_test_driver//..." | xargs bazel build "${BUILD_ARGV[@]}"
bazel build "@com_googlesource_code_re2//:re2" "${BUILD_ARGV[@]}"

unset BAZEL_LINKLIBS
unset BAZEL_LINKOPTS
Expand Down