From 2f74020e2163e90594bbcb1e4327538ebd30ffcd Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 03:58:27 +0900 Subject: [PATCH 01/17] Use brew to simply install bazel 1.0.0 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aaa5d8f0..d6ef187a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: Install bazel 1.0.0 and Build shell: bash run: | - (cd "/usr/local/Cellar/bazel/3.3.1/libexec/bin" && curl -LO https://releases.bazel.build/1.0.0/release/bazel-1.0.0-darwin-x86_64 && chmod +x bazel-1.0.0-darwin-x86_64) + brew tap bazelbuild/tap && brew extract bazel bazelbuild/tap --version 1.0.0 CC=g++ bazel build //alphasql:all mkdir alphasql_darwin_amd64 mv ./bazel-bin/alphasql/dag ./alphasql_darwin_amd64/dag From 29a90957536bfb1d138b0d1e4127937020e3464b Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 04:02:41 +0900 Subject: [PATCH 02/17] Add test for MacOS and check the installation by brew --- .github/workflows/test.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 763b2565..212a74ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,8 +1,8 @@ name: test on: push jobs: - test: - name: Test the repository + linux: + name: Test the repository on Linux runs-on: ubuntu-latest steps: - name: Checkout the repository @@ -29,3 +29,23 @@ jobs: echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list sudo apt update && sudo apt install bazel-1.0.0 bazel test --test_output=errors //alphasql/... + + osx: + name: Test the repository on Mac + runs-on: macOS-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + - name: Cache + uses: actions/cache@v2 + with: + path: /private/var/tmp + key: ${{ runner.os }}-bazel-build-${{ hashFiles('./**') }} + restore-keys: ${{ runner.os }}-bazel-build- + - name: Test the repository + shell: bash + run: | + brew tap bazelbuild/tap && brew extract bazel bazelbuild/tap --version 1.0.0 + bazel test --test_output=errors //alphasql/... From a2c57c7916cf498a6230a2883e06b3c414a1a0f3 Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 04:10:37 +0900 Subject: [PATCH 03/17] Use logged way --- .github/workflows/release.yml | 4 +++- .github/workflows/test.yml | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6ef187a..51f3816a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,9 @@ jobs: - name: Install bazel 1.0.0 and Build shell: bash run: | - brew tap bazelbuild/tap && brew extract bazel bazelbuild/tap --version 1.0.0 + (cd "/usr/local/Cellar/bazel/*/libexec/bin" && + curl -LO https://releases.bazel.build/1.0.0/release/bazel-1.0.0-darwin-x86_64 && + chmod +x bazel-1.0.0-darwin-x86_64) CC=g++ bazel build //alphasql:all mkdir alphasql_darwin_amd64 mv ./bazel-bin/alphasql/dag ./alphasql_darwin_amd64/dag diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 212a74ce..b1f9d286 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,5 +47,8 @@ jobs: - name: Test the repository shell: bash run: | + (cd "/usr/local/Cellar/bazel/*/libexec/bin" && + curl -LO https://releases.bazel.build/1.0.0/release/bazel-1.0.0-darwin-x86_64 && + chmod +x bazel-1.0.0-darwin-x86_64) brew tap bazelbuild/tap && brew extract bazel bazelbuild/tap --version 1.0.0 bazel test --test_output=errors //alphasql/... From 8b7e5acabc6509ed9c6bbaa5021018a84ad3a1bd Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 04:24:45 +0900 Subject: [PATCH 04/17] Try bazelisk --- .github/workflows/release.yml | 4 +--- .github/workflows/test.yml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 51f3816a..6da158a9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,9 +22,7 @@ jobs: - name: Install bazel 1.0.0 and Build shell: bash run: | - (cd "/usr/local/Cellar/bazel/*/libexec/bin" && - curl -LO https://releases.bazel.build/1.0.0/release/bazel-1.0.0-darwin-x86_64 && - chmod +x bazel-1.0.0-darwin-x86_64) + brew install bazelisk CC=g++ bazel build //alphasql:all mkdir alphasql_darwin_amd64 mv ./bazel-bin/alphasql/dag ./alphasql_darwin_amd64/dag diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b1f9d286..eb8e2738 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,8 +47,6 @@ jobs: - name: Test the repository shell: bash run: | - (cd "/usr/local/Cellar/bazel/*/libexec/bin" && - curl -LO https://releases.bazel.build/1.0.0/release/bazel-1.0.0-darwin-x86_64 && - chmod +x bazel-1.0.0-darwin-x86_64) + brew install bazelisk brew tap bazelbuild/tap && brew extract bazel bazelbuild/tap --version 1.0.0 bazel test --test_output=errors //alphasql/... From 74680e0e00ba1bd761e8f6ed142fa87b1bfd2bbb Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 04:30:01 +0900 Subject: [PATCH 05/17] Use bazelisk as launcher --- .github/workflows/release.yml | 20 ++++---------------- .github/workflows/test.yml | 17 ++--------------- 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6da158a9..bb7e4bdf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,11 +19,10 @@ jobs: path: /private/var/tmp key: ${{ runner.os }}-bazel-build-${{ hashFiles('./**') }} restore-keys: ${{ runner.os }}-bazel-build- - - name: Install bazel 1.0.0 and Build + - name: Build shell: bash run: | - brew install bazelisk - CC=g++ bazel build //alphasql:all + CC=g++ bazelisk build //alphasql:all mkdir alphasql_darwin_amd64 mv ./bazel-bin/alphasql/dag ./alphasql_darwin_amd64/dag mv ./bazel-bin/alphasql/pipeline_type_checker ./alphasql_darwin_amd64/pipeline_type_checker @@ -55,20 +54,9 @@ jobs: path: ~/.cache/bazel key: ${{ runner.os }}-bazel-build-${{ hashFiles('./**') }} restore-keys: ${{ runner.os }}-bazel-build- - - name: Install bazel 1.0.0 and Build + - name: Build run: | - sudo apt-get update && \ - sudo apt-get install tzdata build-essential software-properties-common -y && \ - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ - sudo apt-get update && \ - sudo apt-get install --no-install-recommends -y make gcc-9 g++-9 && \ - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 900 \ - --slave /usr/bin/g++ g++ /usr/bin/g++-9 - sudo apt install curl gnupg - curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - - echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list - sudo apt update && sudo apt install bazel-1.0.0 - bazel build //... + bazelisk build //... mkdir alphasql_linux_x86_64 mv ./bazel-bin/alphasql/dag ./alphasql_linux_x86_64/dag mv ./bazel-bin/alphasql/pipeline_type_checker ./alphasql_linux_x86_64/pipeline_type_checker diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb8e2738..4f31723e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,18 +17,7 @@ jobs: restore-keys: ${{ runner.os }}-bazel-build- - name: Test the repository run: | - sudo apt-get update && \ - sudo apt-get install tzdata build-essential software-properties-common -y && \ - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ - sudo apt-get update && \ - sudo apt-get install --no-install-recommends -y make gcc-9 g++-9 && \ - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 900 \ - --slave /usr/bin/g++ g++ /usr/bin/g++-9 - sudo apt install curl gnupg - curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - - echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list - sudo apt update && sudo apt install bazel-1.0.0 - bazel test --test_output=errors //alphasql/... + bazelisk test --test_output=errors //alphasql/... osx: name: Test the repository on Mac @@ -47,6 +36,4 @@ jobs: - name: Test the repository shell: bash run: | - brew install bazelisk - brew tap bazelbuild/tap && brew extract bazel bazelbuild/tap --version 1.0.0 - bazel test --test_output=errors //alphasql/... + bazelisk test --test_output=errors //alphasql/... From fae99f9971b616802097e457f084ce422ce69aa2 Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 04:41:56 +0900 Subject: [PATCH 06/17] Fix minor options --- .github/workflows/test.yml | 4 ++-- Makefile | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4f31723e..b87b6d4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: restore-keys: ${{ runner.os }}-bazel-build- - name: Test the repository run: | - bazelisk test --test_output=errors //alphasql/... + bazelisk test --test_output=errors //alphasql/... osx: name: Test the repository on Mac @@ -36,4 +36,4 @@ jobs: - name: Test the repository shell: bash run: | - bazelisk test --test_output=errors //alphasql/... + CC=g++ bazelisk test --test_output=errors //alphasql/... diff --git a/Makefile b/Makefile index f699d6c9..85ccfb8e 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,10 @@ .PHONY: build-and-check -build-and-check: test sample +build-and-check: test + make sample .PHONY: osx osx: - CC=g++ bazel build //alphasql:all + CC=g++ bazelisk build //alphasql:all sudo cp ./bazel-bin/alphasql/dag /usr/local/bin sudo cp ./bazel-bin/alphasql/pipeline_type_checker /usr/local/bin @@ -19,4 +20,4 @@ sample: osx .PHONY: test test: osx - CC=g++ bazel test //alphasql:all + CC=g++ bazelisk test //alphasql:all From a74eb8f599dc822aa79d5f63eff548d219aa4ac0 Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 04:50:39 +0900 Subject: [PATCH 07/17] Remove CC=g++ from CI because it is problem on local environment --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb7e4bdf..2aa498c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: Build shell: bash run: | - CC=g++ bazelisk build //alphasql:all + bazelisk build //alphasql:all mkdir alphasql_darwin_amd64 mv ./bazel-bin/alphasql/dag ./alphasql_darwin_amd64/dag mv ./bazel-bin/alphasql/pipeline_type_checker ./alphasql_darwin_amd64/pipeline_type_checker diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b87b6d4d..9afdaf76 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,4 +36,4 @@ jobs: - name: Test the repository shell: bash run: | - CC=g++ bazelisk test --test_output=errors //alphasql/... + bazelisk test --test_output=errors //alphasql/... From eed1b6b5e41f894f8cfa7b21a9949890bbd22793 Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 05:07:46 +0900 Subject: [PATCH 08/17] Colorize stderr to notice broken changes --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 85ccfb8e..1dcb6237 100644 --- a/Makefile +++ b/Makefile @@ -10,11 +10,14 @@ osx: .PHONY: sample sample: osx + color() { \ + set -o pipefail; "$$@" 2>&1>&3|sed $$'s,.*,\e[31m&\e[m,'>&2; \ + } 3>&1 && \ ls -d samples/*/ | while read sample; do \ echo ""; \ dag $$sample --output_path $$sample/dag.dot; \ dot -Tpng $$sample/dag.dot -o $$sample/dag.png; \ - pipeline_type_checker $$sample/dag.dot \ + color pipeline_type_checker $$sample/dag.dot \ --json_schema_path ./samples/sample-schema.json; \ done; From 78e49f8b6518cfe4ebe04c41efc8993331e061c7 Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 05:10:29 +0900 Subject: [PATCH 09/17] Change TODO description because we already emit errors on duplicated function definitions --- alphasql/dag_lib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alphasql/dag_lib.h b/alphasql/dag_lib.h index d566faac..bd542604 100644 --- a/alphasql/dag_lib.h +++ b/alphasql/dag_lib.h @@ -98,8 +98,8 @@ namespace alphasql { } auto function_info = function_information_or_status.value(); - // TODO(Matts966): Multiple function definitions lead to cycles like tables - // and we should think if we should raise error here. + // TODO(Matts966): Multiple function definitions leads to duplicate key errors + // and problematic, so emit an understandable error here is more helpful. for (auto const& defined : function_info.defined) { const std::string function_name = absl::StrJoin(defined, "."); From d38b8c38f0d0cf7b21aeb23a0c1bafc48ade516c Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 05:29:42 +0900 Subject: [PATCH 10/17] Try c++17 --- .bazelrc | 23 +---------------------- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/.bazelrc b/.bazelrc index 9cbea588..f64d0a7f 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,22 +1 @@ -# -# Copyright 2019 ZetaSQL Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# ZetaSQL requires c++17 support to match internal Google development -# environments. -# c++1z was used prior to c++17 being standardized, and is therefore more -# widely accepted by compilers. This may lead to strange behavior or compiler -# errors in earlier compilers. -build --cxxopt="-std=c++1z" +build --cxxopt="-std=c++17" diff --git a/Makefile b/Makefile index 1dcb6237..308b2053 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ build-and-check: test .PHONY: osx osx: - CC=g++ bazelisk build //alphasql:all + bazelisk build //alphasql:all sudo cp ./bazel-bin/alphasql/dag /usr/local/bin sudo cp ./bazel-bin/alphasql/pipeline_type_checker /usr/local/bin @@ -23,4 +23,4 @@ sample: osx .PHONY: test test: osx - CC=g++ bazelisk test //alphasql:all + bazelisk test //alphasql:all From 15f35d1e654fc91b9127f4b12440bb7a67566cda Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 06:12:39 +0900 Subject: [PATCH 11/17] Reset cache by changing keys --- .bazelrc | 23 ++++++++++++++++++++++- .github/workflows/test.yml | 4 ++-- Makefile | 4 ++-- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.bazelrc b/.bazelrc index f64d0a7f..9cbea588 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1 +1,22 @@ -build --cxxopt="-std=c++17" +# +# Copyright 2019 ZetaSQL Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# ZetaSQL requires c++17 support to match internal Google development +# environments. +# c++1z was used prior to c++17 being standardized, and is therefore more +# widely accepted by compilers. This may lead to strange behavior or compiler +# errors in earlier compilers. +build --cxxopt="-std=c++1z" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9afdaf76..f4863065 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,8 +13,8 @@ jobs: uses: actions/cache@v2 with: path: ~/.cache/bazel - key: ${{ runner.os }}-bazel-build-${{ hashFiles('./**') }} - restore-keys: ${{ runner.os }}-bazel-build- + key: ${{ runner.os }}-bazelisk-build-${{ hashFiles('./**') }} + restore-keys: ${{ runner.os }}-bazelisk-build- - name: Test the repository run: | bazelisk test --test_output=errors //alphasql/... diff --git a/Makefile b/Makefile index 308b2053..1dcb6237 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ build-and-check: test .PHONY: osx osx: - bazelisk build //alphasql:all + CC=g++ bazelisk build //alphasql:all sudo cp ./bazel-bin/alphasql/dag /usr/local/bin sudo cp ./bazel-bin/alphasql/pipeline_type_checker /usr/local/bin @@ -23,4 +23,4 @@ sample: osx .PHONY: test test: osx - bazelisk test //alphasql:all + CC=g++ bazelisk test //alphasql:all From 51a829316012440b5d4f4b5f909acf851083b1fc Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 06:17:36 +0900 Subject: [PATCH 12/17] Change keys on Mac and release too --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f4863065..cb1fa826 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,8 +31,8 @@ jobs: uses: actions/cache@v2 with: path: /private/var/tmp - key: ${{ runner.os }}-bazel-build-${{ hashFiles('./**') }} - restore-keys: ${{ runner.os }}-bazel-build- + key: ${{ runner.os }}-bazelisk-build-${{ hashFiles('./**') }} + restore-keys: ${{ runner.os }}-bazelisk-build- - name: Test the repository shell: bash run: | From 9a26f2be5448d1411942b7c28d75603a36b8e822 Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 09:06:33 +0900 Subject: [PATCH 13/17] Add tmate debug step --- .github/workflows/test.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb1fa826..47794cf3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,11 @@ jobs: path: ~/.cache/bazel key: ${{ runner.os }}-bazelisk-build-${{ hashFiles('./**') }} restore-keys: ${{ runner.os }}-bazelisk-build- + + + - name: Setup tmate session + uses: mxschmitt/action-tmate@v2 + - name: Test the repository run: | bazelisk test --test_output=errors //alphasql/... @@ -33,6 +38,10 @@ jobs: path: /private/var/tmp key: ${{ runner.os }}-bazelisk-build-${{ hashFiles('./**') }} restore-keys: ${{ runner.os }}-bazelisk-build- + + - name: Setup tmate session + uses: mxschmitt/action-tmate@v2 + - name: Test the repository shell: bash run: | From 62400c34e2acc732b8312c4576a59c1549f88ae0 Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 13:29:41 +0900 Subject: [PATCH 14/17] Fix lack of tools and remove debug steps --- .github/workflows/release.yml | 14 +++++++++----- .github/workflows/test.yml | 13 ++++--------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2aa498c3..5978522a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,12 +17,12 @@ jobs: uses: actions/cache@v2 with: path: /private/var/tmp - key: ${{ runner.os }}-bazel-build-${{ hashFiles('./**') }} - restore-keys: ${{ runner.os }}-bazel-build- + key: ${{ runner.os }}-bazelisk-build-${{ hashFiles('./**') }} + restore-keys: ${{ runner.os }}-bazelisk-build- - name: Build shell: bash run: | - bazelisk build //alphasql:all + CC=g++ bazelisk build //alphasql:all mkdir alphasql_darwin_amd64 mv ./bazel-bin/alphasql/dag ./alphasql_darwin_amd64/dag mv ./bazel-bin/alphasql/pipeline_type_checker ./alphasql_darwin_amd64/pipeline_type_checker @@ -52,10 +52,14 @@ jobs: uses: actions/cache@v2 with: path: ~/.cache/bazel - key: ${{ runner.os }}-bazel-build-${{ hashFiles('./**') }} - restore-keys: ${{ runner.os }}-bazel-build- + key: ${{ runner.os }}-bazelisk-build-${{ hashFiles('./**') }} + restore-keys: ${{ runner.os }}-bazelisk-build- - name: Build run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y gcc-9 g++-9 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 900 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-9 bazelisk build //... mkdir alphasql_linux_x86_64 mv ./bazel-bin/alphasql/dag ./alphasql_linux_x86_64/dag diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 47794cf3..e307ce05 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,13 +15,12 @@ jobs: path: ~/.cache/bazel key: ${{ runner.os }}-bazelisk-build-${{ hashFiles('./**') }} restore-keys: ${{ runner.os }}-bazelisk-build- - - - - name: Setup tmate session - uses: mxschmitt/action-tmate@v2 - - name: Test the repository run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y gcc-9 g++-9 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 900 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-9 bazelisk test --test_output=errors //alphasql/... osx: @@ -38,10 +37,6 @@ jobs: path: /private/var/tmp key: ${{ runner.os }}-bazelisk-build-${{ hashFiles('./**') }} restore-keys: ${{ runner.os }}-bazelisk-build- - - - name: Setup tmate session - uses: mxschmitt/action-tmate@v2 - - name: Test the repository shell: bash run: | From 1bec33621ef41b4aad02296cb8f7b1979b666056 Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 13:38:38 +0900 Subject: [PATCH 15/17] Add forgotten CC=g++ --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e307ce05..3a4213cb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,4 +40,4 @@ jobs: - name: Test the repository shell: bash run: | - bazelisk test --test_output=errors //alphasql/... + CC=g++ bazelisk test --test_output=errors //alphasql/... From 3f700513d957ffe0bcbaddcdabe08375cd9269dd Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 13:48:17 +0900 Subject: [PATCH 16/17] Try to use make because it worked on tmate session --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5978522a..48081d71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: Build shell: bash run: | - CC=g++ bazelisk build //alphasql:all + make mkdir alphasql_darwin_amd64 mv ./bazel-bin/alphasql/dag ./alphasql_darwin_amd64/dag mv ./bazel-bin/alphasql/pipeline_type_checker ./alphasql_darwin_amd64/pipeline_type_checker diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3a4213cb..6cc11f23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,4 +40,4 @@ jobs: - name: Test the repository shell: bash run: | - CC=g++ bazelisk test --test_output=errors //alphasql/... + make From ef4269f33d92c77031142d50996935df3fa998dd Mon Sep 17 00:00:00 2001 From: Matts966 Date: Sat, 1 Aug 2020 14:40:10 +0900 Subject: [PATCH 17/17] Use glob path for caching to prevent `tar format cannot archive sockettar` --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48081d71..6ed6e906 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - name: Cache uses: actions/cache@v2 with: - path: /private/var/tmp + path: /private/var/tmp/*bazel* key: ${{ runner.os }}-bazelisk-build-${{ hashFiles('./**') }} restore-keys: ${{ runner.os }}-bazelisk-build- - name: Build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6cc11f23..c70f446a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: - name: Cache uses: actions/cache@v2 with: - path: /private/var/tmp + path: /private/var/tmp/*bazel* key: ${{ runner.os }}-bazelisk-build-${{ hashFiles('./**') }} restore-keys: ${{ runner.os }}-bazelisk-build- - name: Test the repository