Improve logging for gradle resolver (#378) #60
This file contains 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: Release | |
on: | |
push: | |
branches: | |
- main | |
- master | |
jobs: | |
native-image: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-20.04] | |
include: | |
- os: macos-latest | |
graal_url: https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.2/graalvm-ce-java11-darwin-amd64-22.3.2.tar.gz | |
artifact: bazel-deps-macos | |
bazel_installer_sha: 967189ebadd6b65b1dd25464fdd4d2fcff7a00e0b776be425b19e283432d7862 | |
bazel_version: 6.3.2 | |
- os: ubuntu-20.04 | |
graal_url: https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.2/graalvm-ce-java11-linux-amd64-22.3.2.tar.gz | |
artifact: bazel-deps-linux | |
bazel_installer_sha: 35f398ad93af2b5eadd4b6b4fd4d4803b726029e572f40c4e1fe736db3de944b | |
bazel_version: 6.3.2 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Bazel output cache | |
id: cache-bazel | |
uses: actions/cache@v4 | |
with: | |
path: "${{ github.workspace }}/.bazel-cache" | |
key: ${{ runner.os }}-bazel-out-${{ github.run_id}} | |
restore-keys: | | |
${{ runner.os }}-bazel-out- | |
- name: Configure bazel config for actions | |
run: | | |
echo "build --config github_actions" > user.bazelrc | |
echo "build --disk_cache ${{ github.workspace }}/.bazel-cache/disk-cache" >> user.bazelrc | |
echo "build --repository_cache ${{ github.workspace }}/.bazel-cache/repo-cache" >> user.bazelrc | |
- name: Build deploy jar | |
run: ./ci_scripts/build_deploy_jar.sh | |
env: | |
BAZEL_VERSION: ${{ matrix.bazel_version }} | |
BAZEL_INSTALLER_SHA: ${{ matrix.bazel_installer_sha }} | |
BAZEL_BIN_LOC: "${{ github.workspace }}/.bazel-cache/bazel-bin" | |
- name: Prepare outputs from platform run | |
run: ./ci_scripts/prepare_output.sh bazel-deps.jar bazel-deps.jar staging-directory | |
- uses: actions/upload-artifact@master | |
# we only need to upload bazel-deps.jar one time, and it will error if we try twice | |
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') && matrix.os == 'ubuntu-20.04' | |
with: | |
name: bazel-deps.jar | |
path: staging-directory | |
- uses: olafurpg/setup-scala@v14 | |
- run: jabba install [email protected]=tgz+${{ matrix.graal_url }} | |
- name: Make native image | |
run: ./ci_scripts/make_native_artifact.sh ${{ matrix.graal_url }} | |
- name: Prepare outputs from platform run | |
run: ./ci_scripts/prepare_output.sh bazel-deps ${{ matrix.artifact }} staging-directory | |
- uses: actions/upload-artifact@master | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' | |
with: | |
name: ${{ matrix.artifact }} | |
path: staging-directory | |
make_release: | |
name: Make release | |
needs: native-image | |
runs-on: ubuntu-20.04 | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download linux bazel-deps | |
uses: actions/download-artifact@v4 | |
with: | |
name: bazel-deps-linux | |
path: downloads | |
- name: Download macos bazel-deps | |
uses: actions/download-artifact@v4 | |
with: | |
name: bazel-deps-macos | |
path: downloads | |
- name: Download bazel-deps.jar | |
uses: actions/download-artifact@v4 | |
with: | |
name: bazel-deps.jar | |
path: downloads | |
- name: show downloads | |
run : ls -R downloads | |
- name: Build update_dependencies.sh | |
run: ./ci_scripts/make_update_dependencies.sh "v0.1-${{ github.run_number }}" | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "v0.1-${{ github.run_number }}" | |
prerelease: false | |
title: "Auto generated release" | |
files: | | |
downloads/bazel-deps-macos | |
downloads/bazel-deps-macos.sha256 | |
downloads/bazel-deps-linux | |
downloads/bazel-deps-linux.sha256 | |
downloads/bazel-deps.jar | |
downloads/bazel-deps.jar.sha256 | |
update_dependencies.sh | |
id: "automatic_releases" |