Skip to content

Fix issue with missing jars in package project #114

Fix issue with missing jars in package project

Fix issue with missing jars in package project #114

Workflow file for this run

name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
workflow_dispatch:
permissions: {}
jobs:
build-and-test:
name: Build and Test (OS ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest] #, windows-latest] # https://github.com/coactions/setup-xvfb/issues/18
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get Time for BUILD_ID
id: time
uses: nanzm/[email protected]
with:
format: "YYYYMMDD_HHmm"
- name: Get Branch name for BUILD_LABEL
id: branch_name
shell: bash
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/*.target') }}
restore-keys: |
${{ runner.os }}-m2
- name: Cache IntelliJ Aspects
uses: actions/cache@v3
with:
path: ./bundles/com.salesforce.bazel.sdk/aspects
key: ${{ runner.os }}-aspects-${{ hashFiles('**/aspects/import/import-and-build.sh', '**/aspects/import/WORKSPACE') }}
- name: Cache Bazel repository cache
uses: actions/cache@v3
with:
path: |
~/.cache/bazel
~/.cache/bazelisk
key: ${{ runner.os }}-bazel
- name: Setup Bazelisk
uses: bazelbuild/setup-bazelisk@v2
- name: Print Maven toolchains.xml
shell: bash
run: cat ~/.m2/toolchains.xml
- name: Import IntelliJ Aspects
working-directory: ./bundles/com.salesforce.bazel.sdk/aspects/import
shell: bash
run: ./import-and-build.sh
- name: Build and Test
uses: coactions/setup-xvfb@v1
env:
BUILD_ID: "${{ steps.time.outputs.time }}"
BUILD_TYPE: "S"
BUILD_LABEL: "CI ${{ steps.time.outputs.time }} (${{ steps.branch_name.outputs.branch }})"
with:
shell: bash
run: ./mvnw --batch-mode --no-transfer-progress --strict-checksums --fail-at-end -update-snapshots --show-version --errors clean verify
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: always()
with:
name: test-results-${{ matrix.os }}
path: tests/**/target/surefire-reports/*.xml
- name: Upload p2 Repository
uses: actions/upload-artifact@v3
if: success() && matrix.os == 'ubuntu-latest'
with:
name: p2-repository
path: releng/p2repository/target/repository/
if-no-files-found: error
event_file:
name: "Event File"
runs-on: ubuntu-latest
# needed for publishing test results from forks
steps:
- name: Upload
uses: actions/upload-artifact@v3
with:
name: ci-event-file
path: ${{ github.event_path }}