This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: H2O-3 CI Nightly | |
| on: | |
| push: | |
| branches: | |
| - devops/rohan/mig-h2o-3-nightly-pipeline-to-gha | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| checkout-and-build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| env: | |
| MODE: MODE_NIGHTLY | |
| outputs: | |
| build-success: ${{ steps.set-status.outputs.result }} | |
| mode: ${{ env.MODE }} | |
| steps: | |
| - name: Checkout H2O-3 | |
| uses: actions/checkout@v4 | |
| - name: Cache Gradle dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: ${{ runner.os }}-gradle | |
| - name: Make scripts executable | |
| run: chmod +x ./scripts/github/*.sh | |
| - name: Install Python & cache | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11 | |
| - name: Cache Python pip | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: ${{ runner.os }}-pip- | |
| - name: Install Python dependencies | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip install 'tabulate>=0.7.5' 'requests>=2.10' 'wheel' | |
| - name: Install R and dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y r-base ghostscript pandoc | |
| mkdir -p "$HOME/R/library" | |
| echo 'R_LIBS_USER=~/R/library' >> ~/.Renviron | |
| echo "R_LIBS_USER=$HOME/R/library" >> $GITHUB_ENV | |
| echo "HOME=$HOME" >> $GITHUB_ENV | |
| Rscript -e 'install.packages(c("roxygen2", "devtools", "pkgdown"), repos="https://cloud.r-project.org", lib="~/R/library")' | |
| - name: Verify R setup | |
| run: | | |
| Rscript -e 'sessionInfo()' | |
| pdflatex --version || echo "pdflatex skipped" | |
| - name: Recreate symlink | |
| run: ln -s ../h2o-py/h2o h2o-py-cloud-extensions/h2o | |
| - name: Retry Health Check & Build | |
| id: set-status | |
| run: | | |
| echo "::group::Health check and build" | |
| for i in {1..3}; do | |
| echo "Attempt $i" | |
| if ./scripts/github/init_pipeline.sh "$MODE" && ./scripts/github/health_check.sh; then | |
| echo "result=success" >> $GITHUB_OUTPUT | |
| exit 0 | |
| fi | |
| sleep 10 | |
| done | |
| echo "result=failure" >> $GITHUB_OUTPUT | |
| exit 1 | |
| echo "::endgroup::" | |
| - name: Configure AWS Credentials | |
| if: steps.set-status.outputs.result == 'success' | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| audience: "sts.amazonaws.com" | |
| aws-region: "us-east-1" | |
| role-session-name: "h2o-shared-service-prod" | |
| role-to-assume: "arn:aws:iam::851725263148:role/GitHub-OIDC-Role" | |
| - name: Sync smalldata from S3 | |
| if: steps.set-status.outputs.result == 'success' | |
| run: | | |
| mkdir -p smalldata | |
| aws s3 sync s3://h2o-public-test-data/smalldata/ ./smalldata/ | |
| - name: Run Gradle Build (no clean) | |
| if: steps.set-status.outputs.result == 'success' | |
| run: ./gradlew --build-cache --parallel build -x test -x :h2o-r:buildPackageDocumentation -x :h2o-r:buildPKG -x :h2o-r:buildPKGClient -x :h2o-r:untar --warning-mode all | |
| - name: Upload build artifacts | |
| if: steps.set-status.outputs.result == 'success' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: h2o-3-build | |
| path: | | |
| build/ | |
| h2o-core/build/ | |
| h2o-admissibleml/build/ | |
| h2o-py/build/ | |
| smalldata/ | |
| retention-days: 1 | |
| run-tests: | |
| needs: checkout-and-build | |
| if: needs.checkout-and-build.outputs.build-success == 'success' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 | |
| strategy: | |
| matrix: | |
| java: [17] | |
| python: [3.9, 3.11] | |
| group: [1, 2, 3] | |
| steps: | |
| - name: Checkout H2O-3 | |
| uses: actions/checkout@v4 | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: h2o-3-build | |
| path: . | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| audience: "sts.amazonaws.com" | |
| aws-region: "us-east-1" | |
| role-session-name: "h2o-shared-service-prod" | |
| role-to-assume: "arn:aws:iam::851725263148:role/GitHub-OIDC-Role" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ matrix.java }} | |
| - name: Install Python dependencies | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip install 'tabulate>=0.7.5' 'requests>=2.10' 'wheel' | |
| - name: Recreate symlink | |
| run: ln -s ../h2o-py/h2o h2o-py-cloud-extensions/h2o | |
| - name: Make test scripts executable | |
| run: chmod +x ./scripts/github/*.sh | |
| - name: Run Nightly Tests (Group ${{ matrix.group }}) | |
| run: ./scripts/github/define_test_stages.sh ${{ needs.checkout-and-build.outputs.mode }} ${{ matrix.python }} ${{ matrix.java }} ${{ matrix.group }} | |
| - name: Upload Multi-Node Logs on Failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: h2o-multinode-logs | |
| path: | | |
| h2o-algos/sandbox/multi/ |