You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/03/09 16:05:41 UTC
[plc4x] branch develop updated: chore(build): integrate workflow_dispatch into ensure-platforms.yml
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new ad88301 chore(build): integrate workflow_dispatch into ensure-platforms.yml
ad88301 is described below
commit ad88301bdf491ae781e4145bc9a31312e002f5e2
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed Mar 9 17:05:34 2022 +0100
chore(build): integrate workflow_dispatch into ensure-platforms.yml
---
.github/workflows/ensure-platforms.yml | 25 +++++++++++--
.github/workflows/refresh-caches.yml | 66 ----------------------------------
2 files changed, 23 insertions(+), 68 deletions(-)
diff --git a/.github/workflows/ensure-platforms.yml b/.github/workflows/ensure-platforms.yml
index 7be4cf1..93b0a3b 100644
--- a/.github/workflows/ensure-platforms.yml
+++ b/.github/workflows/ensure-platforms.yml
@@ -18,7 +18,14 @@
# ----------------------------------------------------------------------------
name: "Platform compatibility"
-on: push
+on:
+ push:
+ workflow_dispatch:
+ inputs:
+ forceUpdates:
+ description: "Forces a snapshot update"
+ required: false
+ default: 'false'
jobs:
test:
@@ -88,5 +95,19 @@ jobs:
core.setOutput('platform_suffix', ``)
}
+ - name: Set extra options
+ id: extra_options
+ uses: actions/github-script@v5.0.0
+ env:
+ FORCE_UPDATE: ${{ github.event.inputs.forceUpdates }}
+ with:
+ script: |
+ const { FORCE_UPDATE } = process.env
+ if (FORCE_UPDATE.includes("true")) {
+ core.setOutput('extra_options', `-U`)
+ } else {
+ core.setOutput('extra_options', ``)
+ }
+
- name: Run mvnw
- run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} -T 1C -B -P'with-sandbox,with-c,with-go' ${{ steps.platform_opts.outputs.platform_opts }} install
+ run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -T 1C -B -P'with-sandbox,with-c,with-go' ${{ steps.platform_opts.outputs.platform_opts }} install
diff --git a/.github/workflows/refresh-caches.yml b/.github/workflows/refresh-caches.yml
deleted file mode 100644
index a58394e..0000000
--- a/.github/workflows/refresh-caches.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-# ----------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ----------------------------------------------------------------------------
-name: "Refresh cashes"
-
-on: workflow_dispatch
-
-jobs:
- test:
- strategy:
- matrix:
- # 8 not anymore supported for building
- java: [ 11, 17 ]
- os: [ ubuntu-latest, macos-latest, windows-latest ]
- fail-fast: false
- runs-on: ${{ matrix.os }}
- steps:
- - name: Checkout repository
- uses: actions/checkout@v2
-
- - name: Setup Java
- uses: actions/setup-java@v2
- with:
- distribution: 'adopt'
- java-package: jdk
- java-version: ${{ matrix.java }}
-
- - name: Cache local Maven repository
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
-
- - name: Calculate platform suffix
- id: platform_suffix
- uses: actions/github-script@v5.0.0
- env:
- OS: ${{ matrix.os }}
- with:
- script: |
- const { OS } = process.env
- if (OS.includes("windows")) {
- core.setOutput('platform_suffix', `.cmd`)
- } else {
- core.setOutput('platform_suffix', ``)
- }
-
- - name: Run mvnw
- run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} -U -T 1C -B -P'with-sandbox,with-c,with-go' validate