Skip to content

Commit

Permalink
Update CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
petervdonovan committed Jun 22, 2023
1 parent 4a789cd commit e57315c
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 7 deletions.
10 changes: 9 additions & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Build
description: Set up repository and install dependencies required to build extension.

inputs:
partial:
required: false
default: "true"

runs:
using: "composite"
steps:
Expand All @@ -27,18 +32,21 @@ runs:
- name: Install pylint
run: python3 -m pip install pylint
shell: bash
if: ${{ inputs.partial != 'false' }}
- name: Install pnpm
run: npm i -g pnpm
shell: bash
if: ${{ inputs.partial != 'false' }}
- name: Setup Rust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
components: clippy
if: ${{ inputs.partial != 'false' }}
- name: Install RTI
run: |
cd lingua-franca
.github/actions/install-rti/install.sh
cd ..
shell: bash
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
if: ${{ (runner.os == 'macOS' || runner.os == 'Linux') && inputs.partial != 'false' }}
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build

on:
workflow_call:
inputs:
partial:
required: false
default: true
type: boolean

jobs:
build:
steps:
- name: Check out vscode-lingua-franca repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 1
- name: Set up Java 17
run: |
echo "$JAVA_HOME_17_X64/bin" >> $GITHUB_PATH
echo "org.gradle.java.home=${JAVA_HOME_17_X64//\\/\/}" >> gradle.properties
echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
shell: bash
- name: Check settings
run: |
echo $(which java)
cat gradle.properties
echo $JAVA_HOME
shell: bash
- name: Build the VS Code extension
run: npm install --ignore-scripts
shell: bash
- name: Install pylint
run: python3 -m pip install pylint
shell: bash
- name: Install pnpm
run: npm i -g pnpm
shell: bash
- name: Setup Rust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
components: clippy
- name: Install RTI
run: |
cd lingua-franca
.github/actions/install-rti/install.sh
cd ..
shell: bash
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
18 changes: 12 additions & 6 deletions .github/workflows/dependency-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:
branches:
- main
paths:
- '**/check_dependencies.ts'
- '**/version_checker.ts'
- '**/version.ts'
- "**/check_dependencies.ts"
- "**/version_checker.ts"
- "**/version.ts"
# Trigger this workflow also on pull_request events.
pull_request:
paths:
- '**/check_dependencies.ts'
- '**/version_checker.ts'
- '**/version.ts'
- "**/check_dependencies.ts"
- "**/version_checker.ts"
- "**/version.ts"

jobs:
test:
Expand All @@ -33,6 +33,8 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- uses: lf-lang/vscode-lingua-franca/.github/actions/build@update-error-message
with:
partial: "true"
- name: Downgrade dependencies
run: |
pip install -I pylint==2.10.0
Expand All @@ -50,6 +52,8 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- uses: lf-lang/vscode-lingua-franca/.github/actions/build@update-error-message
with:
partial: true
- name: Run tests (Linux)
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test-dependencies-missing-extended
if: ${{ runner.os == 'Linux' }}
Expand All @@ -63,6 +67,8 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- uses: lf-lang/vscode-lingua-franca/.github/actions/build@update-error-message
with:
partial: "true"
- name: Run tests (Linux)
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test-dependencies-missing-basic
if: ${{ runner.os == 'Linux' }}
Expand Down

0 comments on commit e57315c

Please sign in to comment.