Skip to content

Commit

Permalink
WIP of packaging rework to new LS
Browse files Browse the repository at this point in the history
  • Loading branch information
guw committed Jul 12, 2023
1 parent 1e7bad4 commit 040736d
Show file tree
Hide file tree
Showing 11 changed files with 16,473 additions and 4,363 deletions.
128 changes: 128 additions & 0 deletions .github/workflows/ci.yml
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 }}
81 changes: 0 additions & 81 deletions .github/workflows/main.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

11 changes: 0 additions & 11 deletions .project

This file was deleted.

19 changes: 12 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@
"version": "0.2.0",
"configurations": [
{
"name": "Gulp Tester",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"args": [
"build-plugin"
"repo_check"
],
"name": "Gulp Build Plugin",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch",
"cwd": "${workspaceRoot}",
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node"
"console": "internalConsole",
"stopOnEntry": false,
"runtimeArgs": [
"--nolazy"
],
},
{
"name": "Run Extension",
Expand All @@ -42,6 +48,5 @@
],
"preLaunchTask": "${defaultBuildTask}"
}

]
}
}
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
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

Loading

0 comments on commit 040736d

Please sign in to comment.