diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb82d2517..4fa958446 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -154,10 +154,20 @@ jobs: with: submodules: 'true' + - uses: actions/setup-python@v2 + with: + python-version: '3.8' + architecture: 'x64' + - uses: actions/setup-java@v1 with: java-version: 1.8 + - name: Install Python packages + run: | + python -m pip install wheel setuptools + python -m pip install awscli + - name: Cache Maven packages uses: actions/cache@v2 with: @@ -170,6 +180,28 @@ jobs: cd jvm-packages mvn test -B -pl :xgboost4j_2.12 + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch + if: | + (github.ref == 'refs/heads/master' || contains(github.ref, 'refs/heads/release_')) && + matrix.os == 'windows-latest' + + - name: Publish artifact xgboost4j.dll to S3 + run: | + cd lib/ + Rename-Item -Path xgboost4j.dll -NewName xgboost4j_${{ github.sha }}.dll + dir + python -m awscli s3 cp xgboost4j_${{ github.sha }}.dll s3://xgboost-nightly-builds/${{ steps.extract_branch.outputs.branch }}/ --acl public-read + if: | + (github.ref == 'refs/heads/master' || contains(github.ref, 'refs/heads/release_')) && + matrix.os == 'windows-latest' + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_IAM_S3_UPLOADER }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_IAM_S3_UPLOADER }} + + - name: Test XGBoost4J-Spark run: | rm -rfv build/