You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2020/03/09 11:19:56 UTC
[camel-k-runtime] 02/03: chore(build): improve github actions
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git
commit 80fb1b1587cb7bbc3cab7d925eae0c4d84660019
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Fri Mar 6 23:18:26 2020 +0100
chore(build): improve github actions
---
.github/workflows/pr-build.yml | 106 +++++++++++++++++++++++++++++++++++---
.github/workflows/pr-cleanup.yaml | 17 ++++++
.github/workflows/pr-validate.yml | 2 +-
3 files changed, 116 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml
index 377a0e4..83f19c8 100644
--- a/.github/workflows/pr-build.yml
+++ b/.github/workflows/pr-build.yml
@@ -23,14 +23,104 @@ on:
jobs:
build:
runs-on: ubuntu-latest
- strategy:
- matrix:
- java: [ '1.8', '11' ]
steps:
- - uses: actions/checkout@v1
- - name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v1
+ - uses: actions/checkout@v2
+ - name: Set up JDK 8
+ uses: joschi/setup-jdk@v1
with:
- java-version: ${{ matrix.java }}
+ java-version: openjdk8
- name: mvn install
- run: ./mvnw -V -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean install
+ run: ./mvnw -V -B -ntp clean install
+ - name: Save Cache
+ uses: actions/cache@v1
+ with:
+ path: ~/.m2/repository
+ key: maven-${{ github.sha }}
+ restore-keys: |
+ maven-${{ github.sha }}
+ build-additional-jvm:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java:
+ - openjdk11
+ - openjdk12
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up JDK - ${{ matrix.java }}
+ uses: joschi/setup-jdk@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Build on ${{ matrix.java }}
+ run: |
+ ./mvnw -V -B -ntp clean install
+ build-native:
+ runs-on: ubuntu-latest
+ needs: build
+ strategy:
+ fail-fast: false
+ matrix:
+ native-image-project:
+ - :camel-k-quarkus-core-it
+ - :camel-k-quarkus-loader-xml-it
+ - :camel-k-quarkus-loader-yaml-it
+ - :camel-k-runtime-example-quarkus-xml
+ - :camel-k-runtime-example-quarkus-yaml
+ - :camel-k-runtime-example-quarkus-knative
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Set up JDK 8
+ uses: joschi/setup-jdk@v1
+ with:
+ java-version: openjdk8
+ - name: Restore Cache
+ uses: actions/cache@v1
+ with:
+ path: ~/.m2/repository
+ key: maven-${{ github.sha }}
+ restore-keys: |
+ maven-${{ github.sha }}
+ - name: Integration Test - ${{ matrix.native-image-project }}
+ run: |
+ ./mvnw -V -B -ntp -nsu clean install \
+ -Dnative \
+ -Dnative-image.xmx=6g \
+ -Ddocker \
+ -pl ${{ matrix.native-image-project }}
+#
+# JS build disabled as fails for OOM
+# relates to: https://github.com/oracle/graal/issues/2129
+#
+# build-native-js:
+# runs-on: ubuntu-latest
+# needs: build
+# strategy:
+# fail-fast: false
+# matrix:
+# native-image-project:
+# - :camel-k-quarkus-loader-js-it
+# - :camel-k-runtime-example-quarkus-js
+# steps:
+# - name: Checkout
+# uses: actions/checkout@v2
+# - name: Set up JDK 8
+# uses: joschi/setup-jdk@v1
+# with:
+# java-version: openjdk8
+# - name: Restore Cache
+# uses: actions/cache@v1
+# with:
+# path: ~/.m2/repository
+# key: maven-${{ github.sha }}
+# restore-keys: |
+# maven-${{ github.sha }}
+# - name: Examples - ${{ matrix.native-image-project }}
+# run: |
+# ./mvnw -V -B -ntp -nsu clean package \
+# -Dnative \
+# -Dnative-image.xmx=6g \
+# -Ddocker \
+# -DskipTests \
+# -pl ${{ matrix.native-image-project }}
+
diff --git a/.github/workflows/pr-cleanup.yaml b/.github/workflows/pr-cleanup.yaml
new file mode 100644
index 0000000..d406601
--- /dev/null
+++ b/.github/workflows/pr-cleanup.yaml
@@ -0,0 +1,17 @@
+name: Cleanup Previous Runs
+
+on:
+ schedule:
+ # * is a special character in YAML so you have to quote this string
+ - cron: '*/5 * * * *'
+
+jobs:
+ cleanup-prs:
+ if: github.repository == 'apache/camel-k-runtime'
+ name: "Cleanup Previous Runs"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: n1hility/cancel-previous-runs@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ workflow: ci-actions.yml
diff --git a/.github/workflows/pr-validate.yml b/.github/workflows/pr-validate.yml
index 7f033b8..4f97d3f 100644
--- a/.github/workflows/pr-validate.yml
+++ b/.github/workflows/pr-validate.yml
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-name: Validate PR Style
+name: Validate PR
on:
pull_request: