-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
16,473 additions
and
4,363 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
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/get-time-action@v2.0 | ||
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: Setup Node version | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16 | ||
|
||
- name: 📦 Install dependencies | ||
run: npm install #yarn install --frozen-lockfile | ||
|
||
publish: | ||
needs: [build] | ||
if: ${{ success() && contains(github.ref, 'main') }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ./bazel-vscode-0.0.5.vsix | ||
key: ${{ env.cache-name }}-${{ github.run_id }} | ||
- name: Create tag | ||
if: contains(github.ref, 'main') | ||
id: create_tag | ||
run: | | ||
tag=builds-$(date +%Y%m%d-%H%M%S) | ||
echo "tag=$tag" >> $GITHUB_OUTPUT | ||
- name: Create Release | ||
if: contains(github.ref, 'main') | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.create_tag.outputs.tag }} | ||
release_name: ${{ steps.create_tag.outputs.tag }} | ||
draft: true | ||
prerelease: false | ||
- name: Upload Artifact | ||
if: contains(github.ref, 'main') | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./bazel-vscode-0.0.5.vsix | ||
asset_name: bazel-vscode-0.0.5.vsix | ||
asset_content_type: application/octet-stream | ||
- name: Publish Release | ||
if: contains(github.ref, 'main') | ||
uses: eregon/publish-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
release_id: ${{ steps.create_release.outputs.id }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Contribution Guide | ||
|
||
## Setup | ||
|
||
For a proper development setup there are four components required: | ||
|
||
1. This VSCode extension (Bazel VSCode Java) | ||
2. The Bazel JDT Language Server extension | ||
3. The RedHat VSCode Java extension | ||
4. The Eclipse JDT Language Server | ||
|
||
The model we follow here is follows the pattern found in the RedHat VSCode Java extension. | ||
Allthough steps 3 and 4 are optional, they are highly recommended for a full setup which allows contributions upstream to those. | ||
|
||
All repositories must be cloned into the same parent directory, i.e. they all must be siblings and use the default directory name. | ||
|
||
|
||
## Release | ||
|
Oops, something went wrong.