-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: callable workflows for build and publish
This allows a given runtime/os combo to complete later stages without waiting for initial stages to complete accross all runtimes.
- Loading branch information
1 parent
aa21f6c
commit f1b259f
Showing
5 changed files
with
190 additions
and
132 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
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,71 @@ | ||
name: Contextive per Runtime Build | ||
on: | ||
workflow_call: | ||
inputs: | ||
dotnet_runtime: | ||
required: true | ||
type: string | ||
os: | ||
required: true | ||
type: string | ||
env: | ||
DOTNET_VERSION: '7.0.x' | ||
jobs: | ||
|
||
language-server: | ||
name: Language Server | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- uses: ./.github/actions/init-dotnet | ||
|
||
- name: Build | ||
id: build | ||
run: dotnet fsi language-server/build.fsx -- -r ${{ inputs.dotnet_runtime }} | ||
working-directory: src | ||
|
||
- name: Language Server Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Contextive.LanguageServer-${{inputs.dotnet_runtime}} | ||
path: ${{ steps.build.outputs.artifact-path }} | ||
|
||
- uses: ./.github/actions/upload-reports | ||
if: always() | ||
with: | ||
name: 'Contextive Language Server' | ||
reporter: dotnet-trx | ||
|
||
vscode: | ||
name: VsCode Extension | ||
needs: | ||
- language-server | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- uses: ./.github/actions/init-dotnet | ||
|
||
- name: Language Server Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: Contextive.LanguageServer-${{ inputs.dotnet_runtime }} | ||
path: src/ | ||
|
||
- run: echo "XDG_RUNTIME_DIR=/run/user/$(id -u)" >> $GITHUB_ENV | ||
- run: echo "DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus" >> $GITHUB_ENV | ||
|
||
- name: Build | ||
run: dotnet fsi vscode/build.fsx -- -r ${{ inputs.dotnet_runtime }} | ||
working-directory: src | ||
|
||
- uses: ./.github/actions/upload-reports | ||
if: always() | ||
with: | ||
name: 'Contextive VsCode Extension' | ||
reporter: java-junit |
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,65 @@ | ||
name: Contextive per Runtime Publish | ||
on: | ||
workflow_call: | ||
inputs: | ||
dotnet_runtime: | ||
required: true | ||
type: string | ||
os: | ||
required: true | ||
type: string | ||
vsce_platform: | ||
required: true | ||
type: string | ||
secrets: | ||
GH_TOKEN: | ||
required: true | ||
VSCE_PAT: | ||
required: true | ||
|
||
|
||
env: | ||
dotnet-version: '7.0.x' | ||
|
||
jobs: | ||
get-matrix: | ||
uses: ./.github/workflows/get-matrix.yml | ||
with: | ||
matrix-path: .github/release-matrix.yml | ||
|
||
language-server: | ||
name: Language Server | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- uses: ./.github/actions/init-dotnet | ||
|
||
- name: Build | ||
id: build | ||
run: dotnet fsi language-server/build.fsx -- -r ${{ input.dotnet_runtime }} --release ${{ github.ref_name }} | ||
working-directory: src | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
|
||
vscode: | ||
name: VsCode Extension | ||
needs: | ||
- language-server | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- uses: ./.github/actions/init-dotnet | ||
|
||
- name: Build | ||
id: build | ||
run: dotnet fsi vscode/build.fsx -- -r ${{ inputs.dotnet_runtime }} --release ${{ github.ref_name }} --vsce-platform ${{ inputs.vsce_platform }} | ||
working-directory: src | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
VSCE_PAT: ${{ secrets.VSCE_PAT }} |
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,30 @@ | ||
name: Get Matrix | ||
on: | ||
workflow_call: | ||
inputs: | ||
matrix-path: | ||
required: true | ||
type: string | ||
outputs: | ||
matrix: | ||
description: "The first output string" | ||
value: ${{ jobs.get-matrix.outputs.matrix }} | ||
|
||
jobs: | ||
|
||
get-matrix: | ||
name: "Load Build Matrix" | ||
outputs: | ||
matrix: ${{ steps.load-matrix.outputs.matrix }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- id: load-matrix | ||
name: Load Build Matrix | ||
run: | | ||
matrix="matrix=$(yq -P -o=json ${{ inputs.matrix-path }} | jq -c .)" | ||
echo $matrix | ||
echo $matrix >> $GITHUB_OUTPUT |