Skip to content

Commit

Permalink
ci[python,rust]: Use env keyword instead of export (#4775)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Sep 8, 2022
1 parent 7dda077 commit d07ee55
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 26 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,21 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
shell: bash
run: |
- uses: r-lib/actions/setup-r@v1
- name: Set up R
uses: r-lib/actions/setup-r@v1
with:
r-version: '3.5.3' # The R version to download (if necessary) and use.
- run: |
r-version: '3.5.3'
- name: Run benchmark tests
env:
RUSTFLAGS: -C embed-bitcode
run: |
python -m pip install --upgrade pip
pip install virtualenv
python -m venv venv
source venv/bin/activate
pip install -r py-polars/build.requirements.txt
cd py-polars
rustup override set nightly-2022-08-22 && RUSTFLAGS="-C embed-bitcode" maturin develop --release -- -C codegen-units=8 -C lto=thin -C target-cpu=native
rustup override set nightly-2022-08-22 && maturin develop --release -- -C codegen-units=8 -C lto=thin -C target-cpu=native
cd tests/db-benchmark
Rscript -e 'install.packages("data.table", repos="https://Rdatatable.github.io/data.table")'
Rscript groupby-datagen.R 1e7 1e2 5 0
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@ jobs:
run: |
cargo fmt --all -- --check
- name: Run linting checks
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
run : |
# do not produce debug symbols to keep memory usage down
export RUSTFLAGS="-C debuginfo=0"
cd polars && cargo clippy --all-features \
-p polars-core \
-p polars-io \
-p polars-lazy \
-- -D warnings
cargo clippy -- -D warnings
- name: Run tests
run: |
export RUSTFLAGS="-C debuginfo=0"
cd polars && make test && make integration-tests
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
run: cd polars && make test && make integration-tests
- name: Run miri
run: |
cd polars
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-py-release-manylinux-lts-cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: messense/maturin-action@v1
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
RUSTFLAGS: '-C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt'
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt
with:
rust-toolchain: nightly-2022-08-22
maturin-version: '0.13.2'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-py-release-manylinux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: messense/maturin-action@v1
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
RUSTFLAGS: '-C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma'
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
with:
rust-toolchain: nightly-2022-08-22
maturin-version: '0.13.2'
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
uses: messense/maturin-action@v1
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
RUSTFLAGS: '-C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma'
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
with:
rust-toolchain: nightly-2022-08-22
maturin-version: '0.13.2'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-py-release-windows-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
shell: bash
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2
run: |
rm py-polars/README.md
cp README.md py-polars/README.md
cd py-polars
rustup override set nightly-2022-08-22
export RUSTFLAGS='-C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2'
maturin publish \
--no-sdist \
--skip-existing \
-o wheels \
-i python \
--username ritchie46 \
--username ritchie46
4 changes: 3 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ jobs:
cd py-polars/docs
make html
- name: deploy docs
env:
RUSTFLAGS: --cfg docsrs
run: |
set -e
RUSTFLAGS="--cfg docsrs" cargo doc --features=docs-selection --package polars && \
cargo doc --features=docs-selection --package polars && \
echo '<meta http-equiv=refresh content=0;url=polars/index.html>' > target/doc/index.html && \
mkdir target/doc/py-polars
cp -r py-polars/docs/build/html target/doc/py-polars
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docs_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
python -m pip install --upgrade pip
pip install -r py-polars/docs/requirements-docs.txt
- name: Build python reference
env:
SPHINXOPTS: -W
run: |
cd py-polars/docs
make html SPHINXOPTS="-W"
make html
3 changes: 2 additions & 1 deletion .github/workflows/test-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ jobs:
run: |
cd py-polars && mypy ${{ (matrix.python-version == '3.7') && '--allow-untyped-calls' || '' }} && cd ..
- name: Run tests
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
run: |
export RUSTFLAGS="-C debuginfo=0"
cd py-polars && rustup override set nightly-2022-08-22 && make venv && make test-with-cov
make clippy
- name: Check doc examples
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-windows-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
pip install -r py-polars/build.requirements.txt
- name: Run tests
shell: bash
run: |
export RUSTFLAGS="-C debuginfo=0"
cd py-polars && rustup override set nightly-2022-08-22 && make build-and-test-no-venv
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
run: cd py-polars && rustup override set nightly-2022-08-22 && make build-and-test-no-venv
# test if we can import polars without any requirements
- name: Import polars
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v1
- name: Run tests
run: |
set RUSTFLAGS="-C debuginfo=0"
cd polars && make test && make integration-tests
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
run: cd polars && make test && make integration-tests

0 comments on commit d07ee55

Please sign in to comment.