Skip to content

Commit

Permalink
ci: fix to build lib
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Oct 28, 2023
1 parent aa05256 commit addf0ba
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

env:
RPOLARS_CARGO_CLEAN_DEPS: "true"

Expand All @@ -37,6 +41,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
LIBR_POLARS_BUILD: "true"

steps:
- uses: actions/checkout@v3
Expand All @@ -45,17 +50,16 @@ jobs:
uses: smorimoto/tune-github-hosted-runner-network@v1

- name: Set rust target
shell: bash
id: rust-target
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
echo "TARGET=x86_64-pc-windows-gnu" >>$GITHUB_ENV
echo "TARGET=x86_64-pc-windows-gnu" >>$GITHUB_OUTPUT
else
echo "TARGET=$(rustc -vV | grep host | cut -d' ' -f2)" >>$GITHUB_ENV
echo "TARGET=$(rustc -vV | grep host | cut -d' ' -f2)" >>$GITHUB_OUTPUT
fi
- name: Set env vars for build option
if: matrix.config.full-features
shell: bash
run: |
echo "RPOLARS_FULL_FEATURES=true" >>$GITHUB_ENV
echo "RPOLARS_PROFILE=release" >>$GITHUB_ENV
Expand All @@ -64,7 +68,7 @@ jobs:
id: build-lib
with:
rust-nightly: "${{ matrix.config.full-features }}"
target: "${{ env.TARGET }}"
target: "${{ steps.rust-target.outputs.TARGET }}"

- name: print files
run: print(list.files("..",recursive = TRUE,full.names=TRUE))
Expand All @@ -88,17 +92,19 @@ jobs:
env:
CI: false

- name: find binary library
shell: bash
- name: Build lib
env:
NOT_CRAN: "true"
run: |
echo "LIBR_POLARS_PATH=${{ steps.build-lib.outputs.binary-path }}" >>$GITHUB_ENV
Rscript -e 'pkgbuild::compile_dll()'
echo "LIBR_POLARS_PATH=$$(pwd)/src/rust/target/${{ steps.rust-target.outputs.TARGET }}/release/libr_polars.a" >>$GITHUB_ENV
- uses: r-lib/actions/check-r-package@v2
env:
LIBR_POLARS_BUILD: "false"
with:
upload-snapshots: false
error-on: '"never"' #errors are filtered by rules below
env:
LIBR_POLARS_BUILD: "false"

# - name: print R CMD check - install log
# shell: bash
Expand Down

0 comments on commit addf0ba

Please sign in to comment.