diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 5934692c..a129bee1 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -1,7 +1,7 @@ name: build_test on: pull_request: - types: [ opened, synchronize ] + types: [opened, synchronize] jobs: check-rust: runs-on: ubuntu-20.04 @@ -138,7 +138,7 @@ jobs: command: build manylinux: 2014 rust-toolchain: stable - args: --release -m vegafusion-python/Cargo.toml --features=protobuf-src --strip + args: -m vegafusion-python/Cargo.toml --profile release-opt --features=protobuf-src --strip - name: Upload artifacts uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3.1.2 with: @@ -172,7 +172,7 @@ jobs: command: build manylinux: 2_28 rust-toolchain: stable - args: --release -m vegafusion-python/Cargo.toml --features=protobuf-src --strip --target aarch64-unknown-linux-gnu + args: -m vegafusion-python/Cargo.toml --profile release-opt --features=protobuf-src --strip --target aarch64-unknown-linux-gnu - name: Upload artifacts uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3.1.2 with: @@ -189,7 +189,7 @@ jobs: - name: Setup Python uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # pin@4.7 with: - python-version: '3.11' + python-version: "3.11" - uses: prefix-dev/setup-pixi@v0.8.1 with: pixi-version: v0.30.0 @@ -275,7 +275,7 @@ jobs: - name: Setup Python uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # pin@4.7 with: - python-version: '3.11' + python-version: "3.11" - name: Install Chrome uses: browser-actions/setup-chrome@f0ff752add8c926994566c80b3ceadfd03f24d12 # pin@latest with: @@ -300,7 +300,7 @@ jobs: python -m pip install pyarrow pandas polars-lts-cpu "duckdb>=1.0" "vl-convert-python>=1.0.1rc1" scikit-image "pandas>=2.2" jupytext voila anywidget ipywidgets chromedriver-binary-auto # Test dependencies - python -m pip install pytest altair vega-datasets scikit-image jupytext voila ipykernel anywidget ipywidgets selenium flaky tenacity chromedriver-binary-auto + python -m pip install pytest altair vega-datasets scikit-image jupytext voila ipykernel anywidget ipywidgets selenium flaky tenacity chromedriver-binary-auto - name: Test lazy imports working-directory: vegafusion-python/ run: python checks/check_lazy_imports.py @@ -326,7 +326,7 @@ jobs: - name: Setup Python uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # pin@4.7 with: - python-version: '3.10' + python-version: "3.10" - name: Download vegafusion-python wheel uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281 # pin@v2 with: @@ -357,7 +357,7 @@ jobs: - name: Setup Python uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # pin@4.7 with: - python-version: '3.9' + python-version: "3.9" - name: Install Chrome uses: browser-actions/setup-chrome@f0ff752add8c926994566c80b3ceadfd03f24d12 # pin@latest with: @@ -378,14 +378,13 @@ jobs: # Optional dependencies python -m pip install pyarrow pandas "numpy<2" polars[timezone] "duckdb>=1.0" vl-convert-python - + # Test dependencies python -m pip install pytest altair vega-datasets scikit-image - name: Test vegafusion working-directory: vegafusion-python/ run: pytest --ignore=tests/test_jupyter_widget.py - build-vegafusion-server-linux-64: runs-on: ubuntu-20.04 steps: @@ -417,43 +416,42 @@ jobs: path: | vegafusion-server-* -# # Below is an Attempt to cross compile to linux aarch64 within conda environment. -# # It fails in compiling protobuf-src. So instead we fall back to the direct use of -# # cargo (without involving conda). -# -# build-vegafusion-server-linux-arm64: -# runs-on: ubuntu-20.04 -# steps: -# - name: Check out repository code -# uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v3.5.2 -# - name: Install pixi -# run: curl -fsSL https://pixi.sh/install.sh | bash && echo "${HOME}/.pixi/bin" >> $GITHUB_PATH -# - name: Cache -# uses: actions/cache@v3 -# with: -# key: linux-arm64-${{ hashFiles('pixi.lock', 'Cargo.lock', 'vegafusion-python/pyproject.toml') }}-server -# path: | -# ~/.cargo -# target -# .pixi -# - name: Build vegafusion-server -# run: | -# pixi run python automation/download_rust_target.py aarch64-unknown-linux-gnu -# pixi add gcc_linux-aarch64 -p linux-64 -# export RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" -# pixi run build-rs-server --features=protobuf-src --target aarch64-unknown-linux-gnu -# - name: zip executable -# uses: vimtor/action-zip@26a249fb00d43ca98dad77a4b3838025fc226aa1 # pin@v1.1 -# with: -# files: target/aarch64-unknown-linux-gnu/release/vegafusion-server -# dest: vegafusion-server-linux-arm64.zip -# - name: Upload artifacts -# uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3.1.2 -# with: -# name: vegafusion-server -# path: | -# vegafusion-server-* - + # # Below is an Attempt to cross compile to linux aarch64 within conda environment. + # # It fails in compiling protobuf-src. So instead we fall back to the direct use of + # # cargo (without involving conda). + # + # build-vegafusion-server-linux-arm64: + # runs-on: ubuntu-20.04 + # steps: + # - name: Check out repository code + # uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v3.5.2 + # - name: Install pixi + # run: curl -fsSL https://pixi.sh/install.sh | bash && echo "${HOME}/.pixi/bin" >> $GITHUB_PATH + # - name: Cache + # uses: actions/cache@v3 + # with: + # key: linux-arm64-${{ hashFiles('pixi.lock', 'Cargo.lock', 'vegafusion-python/pyproject.toml') }}-server + # path: | + # ~/.cargo + # target + # .pixi + # - name: Build vegafusion-server + # run: | + # pixi run python automation/download_rust_target.py aarch64-unknown-linux-gnu + # pixi add gcc_linux-aarch64 -p linux-64 + # export RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" + # pixi run build-rs-server --features=protobuf-src --target aarch64-unknown-linux-gnu + # - name: zip executable + # uses: vimtor/action-zip@26a249fb00d43ca98dad77a4b3838025fc226aa1 # pin@v1.1 + # with: + # files: target/aarch64-unknown-linux-gnu/release/vegafusion-server + # dest: vegafusion-server-linux-arm64.zip + # - name: Upload artifacts + # uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3.1.2 + # with: + # name: vegafusion-server + # path: | + # vegafusion-server-* build-vegafusion-server-linux-arm64: runs-on: ubuntu-latest @@ -482,7 +480,7 @@ jobs: RUSTFLAGS: "-C linker=aarch64-linux-gnu-gcc" with: command: build - args: -p vegafusion-server --release --features=protobuf-src --target=aarch64-unknown-linux-gnu + args: -p vegafusion-server --features=protobuf-src --profile release-opt --target=aarch64-unknown-linux-gnu - name: zip executable uses: vimtor/action-zip@26a249fb00d43ca98dad77a4b3838025fc226aa1 # pin@v1.1 with: