kszucs commented on a change in pull request #8821:
URL: https://github.com/apache/arrow/pull/8821#discussion_r535900733



##########
File path: .github/workflows/rust.yml
##########
@@ -21,145 +21,286 @@ on:
   push:
     paths:
       - '.github/workflows/rust.yml'
-      - 'ci/docker/*rust*'
-      - 'ci/scripts/rust_*.sh'
-      - 'ci/scripts/util_*.sh'
       - 'rust/**'
       - 'format/Flight.proto'
   pull_request:
     paths:
       - '.github/workflows/rust.yml'
-      - 'ci/docker/*rust*'
-      - 'ci/scripts/rust_*.sh'
-      - 'ci/scripts/util_*.sh'
       - 'rust/**'
       - 'format/Flight.proto'
 
-env:
-  DOCKER_BUILDKIT: 0
-  COMPOSE_DOCKER_CLI_BUILD: 1
-  ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
-  ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
-
 jobs:
 
-  debian:
-    name: AMD64 Debian 10 Rust ${{ matrix.rust }}
+  # build the library, a compilation step used by multiple steps below
+  linux-build-lib:
+    name: Linux ${{ matrix.arch }} Rust ${{ matrix.rust }} build libraries
     runs-on: ubuntu-latest
-    if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
     strategy:
-      fail-fast: false
       matrix:
+        arch: [amd64]
         rust: [nightly-2020-11-24]
-    env:
-      RUST: ${{ matrix.rust }}
+    container:
+      image: ${{ matrix.arch }}/rust
     steps:
-      - name: Checkout Arrow
-        uses: actions/checkout@v2
+      - uses: actions/checkout@v2
+      - name: Cache Cargo
+        uses: actions/cache@v2
         with:
-          fetch-depth: 0
-      - name: Fetch Submodules and Tags
-        shell: bash
-        run: ci/scripts/util_checkout.sh
-      - name: Free Up Disk Space
-        shell: bash
-        run: ci/scripts/util_cleanup.sh
-      - name: Cache Docker Volumes
-        uses: actions/cache@v1
-        with:
-          path: .docker
-          key: debian-10-rust-${{ hashFiles('rust/**/**.rs', 
'rust/**/Cargo.toml') }}
-          restore-keys: debian-10-rust-
-      - name: Setup Python
-        uses: actions/setup-python@v1
-        with:
-          python-version: 3.8
-      - name: Setup Archery
-        run: pip install -e dev/archery[docker]
-      - name: Execute Docker Build
+          # these represent dependencies downloaded by cargo
+          # and thus do not depend on the OS, arch nor rust version.
+          path: /github/home/.cargo
+          key: cargo-cache-
+      - name: Cache Rust dependencies
+        uses: actions/cache@v2
+        with:
+          # these represent compiled steps of both dependencies and arrow
+          # and thus are specific for a particular OS, arch and rust version.
+          path: /github/home/target
+          key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ 
matrix.rust }}-
+      - uses: actions-rs/toolchain@v1
+        with:
+          toolchain: ${{ matrix.rust }}
+          default: true
+          components: rustfmt
+      - name: Build
         run: |
-          sudo sysctl -w kernel.core_pattern="core.%e.%p"
-          ulimit -c unlimited
-          archery docker run debian-rust
-      - name: Fix Cache Permissions
-        run: sudo chmod -R o+r .docker
-      - name: Docker Push
-        if: success() && github.event_name == 'push' && github.repository == 
'apache/arrow'
-        continue-on-error: true
-        shell: bash
-        run: archery docker push debian-rust
+          export CARGO_HOME="/github/home/.cargo"
+          export CARGO_TARGET_DIR="/github/home/target"
+          cd rust
+          cargo build
 
-  windows:
-    name: AMD64 Windows 2019 Rust ${{ matrix.rust }}
-    runs-on: windows-latest
-    if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
+  # test the crate
+  linux-test:
+    name: Linux ${{ matrix.arch }} Rust ${{ matrix.rust }} test workspace
+    needs: [linux-build-lib]
+    runs-on: ubuntu-latest
     strategy:
-      fail-fast: false
       matrix:
+        arch: [amd64]
         rust: [nightly-2020-11-24]
+    container:
+      image: ${{ matrix.arch }}/rust
+      env:
+        ARROW_TEST_DATA: /__w/arrow/arrow/testing/data

Review comment:
       What is the `__w` prefix?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to