diff --git a/.github/workflows/make_wheel.yml b/.github/workflows/make_wheel.yml index 6da24db..90c51db 100644 --- a/.github/workflows/make_wheel.yml +++ b/.github/workflows/make_wheel.yml @@ -58,6 +58,7 @@ jobs: env: CC: ${{ matrix.cfg.cc }} CXX: ${{ matrix.cfg.cxx }} + GCP_KEY: ${{ secrets.GCP_KEY }} WHEEL_NAME: '' steps: @@ -68,10 +69,13 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Python Dependencies - run: pip3 install --upgrade pip packaging check-wheel-contents + run: | + pip3 install --upgrade pip packaging check-wheel-contents + echo "${GCP_KEY}" | base64 -d > "${HOME}/gcp_key.json" - name: Build for Python ${{ matrix.python-version }} - run: bazel --bazelrc=.bazelrc build --compilation_mode=opt --dynamic_mode=off --config=luajit ${{ matrix.cfg.config }} //dmlab2d:dmlab2d_wheel + id: build_wheel + run: bazel --bazelrc=.bazelrc build --remote_cache="https://storage.googleapis.com/dmlab-travis-cache" --google_credentials="${HOME}/gcp_key.json" --compilation_mode=opt --dynamic_mode=off --config=luajit ${{ matrix.cfg.config }} //dmlab2d:dmlab2d_wheel - name: Get built wheel name working-directory: bazel-bin/dmlab2d diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml index 3952ef1..82f297c 100644 --- a/.github/workflows/precommit.yml +++ b/.github/workflows/precommit.yml @@ -37,6 +37,7 @@ jobs: env: CC: ${{ matrix.cc }} CXX: ${{ matrix.cxx }} + GCP_KEY: ${{ secrets.GCP_KEY }} steps: - uses: actions/checkout@v3 @@ -45,40 +46,43 @@ jobs: if: matrix.os == 'ubuntu-22.04' run: | sudo apt-get install python3-dev python3-numpy python3-packaging + echo "${GCP_KEY}" | base64 -d > "${HOME}/gcp_key.json" sudo ln -s /usr/lib/llvm-10/include/c++/v1 /usr/include/c++/v1 - name: install infrastructure (MacOS) if: matrix.os == 'macos-12' || matrix.os == 'macos-13' - run: sudo -H pip3 install numpy packaging + run: | + sudo -H pip3 install numpy packaging + echo "${GCP_KEY}" | base64 -d > "${HOME}/gcp_key.json" - name: build-lua5.1 run: | - bazel --bazelrc=.bazelrc build --config=lua5_1 ${{ matrix.config }} //... + bazel --bazelrc=.bazelrc build --remote_cache="https://storage.googleapis.com/dmlab-travis-cache" --google_credentials="${HOME}/gcp_key.json" --config=lua5_1 ${{ matrix.config }} //... - name: test-lua5.1 if: (!contains(matrix.config, 'arm64')) run: | - bazel --bazelrc=.bazelrc test --config=lua5_1 ${{ matrix.config }} --test_output=errors //... + bazel --bazelrc=.bazelrc test --remote_cache="https://storage.googleapis.com/dmlab-travis-cache" --google_credentials="${HOME}/gcp_key.json" --config=lua5_1 ${{ matrix.config }} --test_output=errors //... - name: build-lua5.2 run: | - bazel --bazelrc=.bazelrc build --config=lua5_2 ${{ matrix.config }} //... + bazel --bazelrc=.bazelrc build --remote_cache="https://storage.googleapis.com/dmlab-travis-cache" --google_credentials="${HOME}/gcp_key.json" --config=lua5_2 ${{ matrix.config }} //... - name: test-lua5.2 if: (!contains(matrix.config, 'arm64')) run: | - bazel --bazelrc=.bazelrc test --config=lua5_2 ${{ matrix.config }} --test_output=errors //... + bazel --bazelrc=.bazelrc test --remote_cache="https://storage.googleapis.com/dmlab-travis-cache" --google_credentials="${HOME}/gcp_key.json" --config=lua5_2 ${{ matrix.config }} --test_output=errors //... - name: build-luajit run: | - bazel --bazelrc=.bazelrc build --config=luajit ${{ matrix.config }} //... + bazel --bazelrc=.bazelrc build --remote_cache="https://storage.googleapis.com/dmlab-travis-cache" --google_credentials="${HOME}/gcp_key.json" --config=luajit ${{ matrix.config }} //... - name: test-luajit if: (!contains(matrix.config, 'arm64')) run: | - bazel --bazelrc=.bazelrc test --config=luajit ${{ matrix.config }} --test_output=errors //... + bazel --bazelrc=.bazelrc test --remote_cache="https://storage.googleapis.com/dmlab-travis-cache" --google_credentials="${HOME}/gcp_key.json" --config=luajit ${{ matrix.config }} --test_output=errors //... - name: build-luajit-internal_unwind run: | - bazel --bazelrc=.bazelrc build --config=luajit ${{ matrix.config }} --copt=-fno-asynchronous-unwind-tables --luajit_external_unwinder=False //... + bazel --bazelrc=.bazelrc build --remote_cache="https://storage.googleapis.com/dmlab-travis-cache" --google_credentials="${HOME}/gcp_key.json" --config=luajit ${{ matrix.config }} --copt=-fno-asynchronous-unwind-tables --luajit_external_unwinder=False //... - name: test-luajit-internal_unwind if: (!contains(matrix.config, 'arm64')) run: | - bazel --bazelrc=.bazelrc test --config=luajit ${{ matrix.config }} --copt=-fno-asynchronous-unwind-tables --luajit_external_unwinder=False --test_output=errors //... + bazel --bazelrc=.bazelrc test --remote_cache="https://storage.googleapis.com/dmlab-travis-cache" --google_credentials="${HOME}/gcp_key.json" --config=luajit ${{ matrix.config }} --copt=-fno-asynchronous-unwind-tables --luajit_external_unwinder=False --test_output=errors //...