Skip to content

Windows Build Check #407

Windows Build Check

Windows Build Check #407

Workflow file for this run

# Copyright (C) 2022 Dremio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Projectnessie GitHub Pull-Request / macOS CI
name: Windows Build Check
on:
pull_request:
types: [labeled, opened, synchronize, reopened]
schedule:
# Run daily on week days
- cron: '0 4 * * 1-5'
workflow_dispatch:
jobs:
java:
name: Java/Gradle Windows
runs-on: windows-2022
if: (github.repository == 'projectnessie/nessie' && github.event_name != 'pull_request') || contains(github.event.pull_request.labels.*.name, 'pr-macos-win')
env:
SPARK_LOCAL_IP: localhost
steps:
- name: Git line ending config
# This is a workaround to pass the ui/ project's prettier configuration, which has the strict
# rule to allow only LF as the line ending.
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v3.5.2
with:
repository: cdarlint/winutils
path: hadoop-winutils
ref: d018bd9c919dee1448b95519351cc591a6338a00
- name: Pull Hadoop
# A local Hadoop setup is required on Windows, very sad...
run: |
cd $HOME
Invoke-WebRequest -Uri https://dlcdn.apache.org/hadoop/common/hadoop-3.3.2/hadoop-3.3.2.tar.gz -TimeoutSec 60 -MaximumRetryCount 10 -OutFile hadoop-3.3.2.tar.gz
- name: Setup Hadoop
# A local Hadoop setup is required on Windows, very sad...
run: |
echo "::group::Extract hadoop-3.3.2.tar.gz"
cd $HOME
mkdir hadoop-3.3.2
cd hadoop-3.3.2
7z e ..\hadoop-3.3.2.tar.gz
echo "::endgroup::"
echo "HADOOP_HOME=$HOME\hadoop-3.3.2" >> $env:GITHUB_ENV
- name: Add Hadoop winutils
run: |
cd hadoop-winutils\hadoop-3.2.2\bin
copy *.dll $HADOOP_HOME\bin
copy *.exp $HADOOP_HOME\bin
copy *.lib $HADOOP_HOME\bin
copy *.pdb $HADOOP_HOME\bin
copy *.exe $HADOOP_HOME\bin
copy *.dll C:\windows\system32
cd ..\..\..
rm -r -fo hadoop-winutils
- uses: actions/checkout@v3.5.2
- name: Setup Java, Gradle
uses: ./.github/actions/dev-tool-java
- name: Gradle / compile
uses: gradle/gradle-build-action@v2
env:
# Same as for ci.yml
GRADLE_BUILD_ACTION_CACHE_KEY_ENVIRONMENT: java-11
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: nessie-ci
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_INSTANCE: ci
with:
cache-read-only: true
arguments: assemble --scan
- name: Gradle / unit test
uses: gradle/gradle-build-action@v2
env:
SPARK_LOCAL_IP: localhost
with:
arguments: test -x :nessie-ui:test --scan
- name: Gradle / check incl. integ-test
uses: gradle/gradle-build-action@v2
with:
arguments: check --scan
- name: Capture Test Reports
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: test-results
path: |
**/build/reports/*
**/build/test-results/*
retention-days: 3
python:
name: Python Windows
runs-on: windows-2022
if: (github.repository == 'projectnessie/nessie' && github.event_name != 'pull_request') || contains(github.event.pull_request.labels.*.name, 'pr-macos-win')
env:
working-directory: ./python
strategy:
max-parallel: 1
matrix:
python-version: ['3.8', '3.9', '3.10', '3.7']
steps:
- uses: actions/checkout@v3.5.2
- name: Setup Python
uses: ./.github/actions/dev-tool-python
with:
python-version: ${{ matrix.python-version }}
- name: Test with tox
run: tox
working-directory: ${{env.working-directory}}