diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 5f5a24992..bc7d8d014 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -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: @@ -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' }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..bac59e5fa --- /dev/null +++ b/.github/workflows/build.yml @@ -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' }} diff --git a/.github/workflows/dependency-tests.yml b/.github/workflows/dependency-tests.yml index 934a575b2..3dde74a01 100644 --- a/.github/workflows/dependency-tests.yml +++ b/.github/workflows/dependency-tests.yml @@ -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: @@ -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 @@ -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' }} @@ -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' }}