Skip to content

fix: patch the build to match with the release (#187) #445

fix: patch the build to match with the release (#187)

fix: patch the build to match with the release (#187) #445

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-jre8:
runs-on: ubuntu-latest
steps:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
id: java
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ^1.17
id: go
- name: Setup Bazelisk
run: go install github.com/bazelbuild/bazelisk@latest && export PATH=$PATH:$(go env GOPATH)/bin
- uses: actions/checkout@v3
- name: Run bazel-diff tests
run: USE_BAZEL_VERSION=latest ~/go/bin/bazelisk test //cli/...
- name: archive testlogs
if: always()
run: cp -R $(~/go/bin/bazelisk info bazel-testlogs) ./test-logs; (cd test-logs; zip -r -X ../test-logs.zip .)
- name: Save test logs
uses: actions/upload-artifact@master
if: always()
with:
name: test-logs-jre8
path: test-logs.zip
test-jre8-run-example:
runs-on: ubuntu-latest
steps:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
id: java
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ^1.17
id: go
- name: Setup Bazelisk
run: go install github.com/bazelbuild/bazelisk@latest && export PATH=$PATH:$(go env GOPATH)/bin
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run bazel-diff example script
run: USE_BAZEL_VERSION=latest ./bazel-diff-example.sh "$GITHUB_WORKSPACE" ~/go/bin/bazelisk $(git rev-parse HEAD~1) $(git rev-parse HEAD)
test-jre11:
runs-on: ubuntu-latest
steps:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ^1.17
id: go
- name: Setup Bazelisk
run: go install github.com/bazelbuild/bazelisk@latest && export PATH=$PATH:$(go env GOPATH)/bin
- uses: actions/checkout@v3
- name: Run bazel-diff tests
run: USE_BAZEL_VERSION=latest ~/go/bin/bazelisk coverage --combined_report=lcov //cli/...
- name: archive testlogs
if: always()
run: cp -R $(~/go/bin/bazelisk info bazel-testlogs) ./test-logs; (cd test-logs; zip -r -X ../test-logs.zip .)
- name: Save test logs
uses: actions/upload-artifact@master
if: always()
with:
name: test-logs-jre11
path: test-logs.zip
test-jre11-run-example:
runs-on: ubuntu-latest
steps:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
id: java
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ^1.17
id: go
- name: Setup Bazelisk
run: go install github.com/bazelbuild/bazelisk@latest && export PATH=$PATH:$(go env GOPATH)/bin
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run bazel-diff example script
run: USE_BAZEL_VERSION=latest ./bazel-diff-example.sh "$GITHUB_WORKSPACE" ~/go/bin/bazelisk $(git rev-parse HEAD~1) $(git rev-parse HEAD)
deploy:
needs: [test-jre8, test-jre11]
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8' ]
steps:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
id: java
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ^1.17
id: go
- name: Setup Bazelisk
run: go install github.com/bazelbuild/bazelisk@latest && export PATH=$PATH:$(go env GOPATH)/bin
- uses: actions/checkout@v3
- name: Build deployable JAR
run: USE_BAZEL_VERSION=latest ~/go/bin/bazelisk build //cli:bazel-diff_deploy.jar
- uses: actions/upload-artifact@v3
with:
name: bazel-diff_deploy.jar
path: bazel-bin/cli/bazel-diff_deploy.jar
if-no-files-found: error