You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2020/05/07 20:10:24 UTC
[camel-quarkus] 01/02: Use artifact uploads/downloads instead of
cache to pass Maven repo to dependent CI jobs
This is an automated email from the ASF dual-hosted git repository.
ppalaga pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit fc9845f7ca147700e5e518a0e0617ee532c7ebb2
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Thu May 7 15:41:37 2020 +0200
Use artifact uploads/downloads instead of cache to pass Maven repo to dependent CI jobs
---
.github/workflows/ci-build.yaml | 75 +++++++++++++++++++++++++++--------------
1 file changed, 50 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml
index 3dc4314..7499b62 100644
--- a/.github/workflows/ci-build.yaml
+++ b/.github/workflows/ci-build.yaml
@@ -50,6 +50,17 @@ jobs:
outputs:
matrix: ${{ steps.set-native-matrix.outputs.matrix }}
steps:
+ - name: Clean VM
+ run: |
+ df -h /
+ echo "Removing unwanted SDKs"
+ sudo rm -rf /usr/local/lib/android \
+ rm -rf /usr/local/share/boost \
+ rm -rf /usr/local/go \
+ rm -rf /usr/share/dotnet \
+ rm -rf /usr/share/rust
+
+ df -h /
- name: Setup apache-snapshots profile
if: github.ref == 'refs/heads/camel-master' || github.base_ref == 'camel-master'
run: |
@@ -75,13 +86,17 @@ jobs:
run: |
./mvnw -V -ntp ${BRANCH_OPTIONS} \
clean install
- - name: Save Cache
- uses: actions/cache@v1
+ - name: Tar Maven Repo
+ shell: bash
+ run: |
+ tar -czf maven-repo.tgz -C ~ .m2/repository
+ ls -lh maven-repo.tgz
+ df -h /
+ - name: Persist Maven Repo
+ uses: actions/upload-artifact@v1
with:
- path: ~/.m2/repository
- key: maven-${{ github.run_id }}-${{ github.run_number }}
- restore-keys: |
- maven-${{ github.run_id }}-${{ github.run_number }}
+ name: maven-repo
+ path: maven-repo.tgz
- name: Setup Native Test Matrix
id: set-native-matrix
run: |
@@ -89,6 +104,7 @@ jobs:
sudo chmod +x /usr/local/bin/yq
CATEGORIES=$(cat .github/test-categories.yaml | yq r - --printMode p "*." | sed "s/\(.*\)/'\1'/" | sed ':a;N;$!ba;s/\n/,/g')
echo "::set-output name=matrix::{'category': [${CATEGORIES}]}"
+
build-alternative-jvm:
runs-on: ubuntu-latest
needs: build
@@ -111,13 +127,17 @@ jobs:
uses: joschi/setup-jdk@v1
with:
java-version: ${{ matrix.java }}
- - name: Restore Cache
- uses: actions/cache@v1
+ - name: Download Maven Repo
+ uses: actions/download-artifact@v1
with:
- path: ~/.m2/repository
- key: maven-${{ github.run_id }}-${{ github.run_number }}
- restore-keys: |
- maven-${{ github.run_id }}-${{ github.run_number }}
+ name: maven-repo
+ path: .
+ - name: Extract Maven Repo
+ shell: bash
+ run: |
+ df -h /
+ tar -xzf maven-repo.tgz -C ~
+ df -h /
- name: Build on ${{ matrix.java }}
run: |
./mvnw -V -ntp ${BRANCH_OPTIONS} \
@@ -144,13 +164,17 @@ jobs:
uses: joschi/setup-jdk@v1
with:
java-version: 11
- - name: Restore Cache
- uses: actions/cache@v1
+ - name: Download Maven Repo
+ uses: actions/download-artifact@v1
with:
- path: ~/.m2/repository
- key: maven-${{ github.run_id }}-${{ github.run_number }}
- restore-keys: |
- maven-${{ github.run_id }}-${{ github.run_number }}
+ name: maven-repo
+ path: .
+ - name: Extract Maven Repo
+ shell: bash
+ run: |
+ df -h /
+ tar -xzf maven-repo.tgz -C ~
+ df -h /
- name: Install yq
run: |
sudo wget -O /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/3.2.1/yq_linux_amd64"
@@ -191,13 +215,14 @@ jobs:
# uses: actions/setup-java@v1
# with:
# java-version: 1.8
- # - name: Restore Cache
- # uses: actions/cache@v1
- # with:
- # path: ~/.m2/repository
- # key: maven-${{ github.run_id }}-${{ github.run_number }}
- # restore-keys: |
- # maven-${{ github.run_id }}-${{ github.run_number }}
+ # - name: Download Maven Repo
+ # uses: actions/download-artifact@v1
+ # with:
+ # name: maven-repo
+ # path: .
+ # - name: Extract Maven Repo
+ # shell: bash
+ # run: tar -xzf maven-repo.tgz -C ~
# # run the :camel-quarkus-integration-test-fhir as standalone process
# # as it building the native image including camel-fhir requires lot
# # of memory this we nee to limit it to avoid the process fail for OOM.