From 990013cd04342d928a39a2378d6ee1777db09a4e Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 18 Mar 2021 14:54:34 +0100 Subject: [PATCH 1/8] Migrate to GH actions Signed-off-by: Pavol Loffay --- .../workflows/{pr-test.yml => smoke-test.yml} | 4 +- .github/workflows/test.yaml | 39 +++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) rename .github/workflows/{pr-test.yml => smoke-test.yml} (96%) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/pr-test.yml b/.github/workflows/smoke-test.yml similarity index 96% rename from .github/workflows/pr-test.yml rename to .github/workflows/smoke-test.yml index 78d6be39b..482c65b64 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/smoke-test.yml @@ -1,4 +1,4 @@ -name: test +name: smoke-test on: push: branches: @@ -36,4 +36,4 @@ jobs: run: make smoke-test env: JVM_OPTS: -Xmx1g - TERM: dumb \ No newline at end of file + TERM: dumb diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 000000000..0fd517488 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,39 @@ +name: build +on: + push: + branches: + - main + paths-ignore: + - '**/README.md' + - 'smoke-tests/matrix' + pull_request: + +jobs: + smoke-test: + runs-on: ubuntu-20.04 + steps: + # Set fetch-depth: 0 to fetch commit history and tags for use in version calculation + - name: Check out code + uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + submodules: true + + - name: create checksum file + uses: hypertrace/github-actions/checksum@main + + - name: Cache packages + id: cache-packages + uses: actions/cache@v2 + with: + path: ~/.gradle + key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }} + restore-keys: | + gradle-packages-${{ runner.os }}-${{ github.job }} + gradle-packages-${{ runner.os }} + + - name: smoke-test + run: make smoke-test + env: + JVM_OPTS: -Xmx1g + TERM: dumb From b502a1eb3ca95fb14cde7b78896bc7eff43e9fd1 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 19 Mar 2021 14:25:55 +0100 Subject: [PATCH 2/8] Action Signed-off-by: Pavol Loffay --- .github/workflows/{test.yaml => build.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{test.yaml => build.yaml} (97%) diff --git a/.github/workflows/test.yaml b/.github/workflows/build.yaml similarity index 97% rename from .github/workflows/test.yaml rename to .github/workflows/build.yaml index 0fd517488..663ce3421 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/build.yaml @@ -33,7 +33,7 @@ jobs: gradle-packages-${{ runner.os }} - name: smoke-test - run: make smoke-test + run: make build env: JVM_OPTS: -Xmx1g TERM: dumb From 3ced9523c242908a7d8550c1acf71763de65f05c Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 19 Mar 2021 14:42:08 +0100 Subject: [PATCH 3/8] Add muzzle Signed-off-by: Pavol Loffay --- .github/workflows/build.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 663ce3421..34502a8e2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,8 +32,14 @@ jobs: gradle-packages-${{ runner.os }}-${{ github.job }} gradle-packages-${{ runner.os }} - - name: smoke-test + - name: build run: make build env: JVM_OPTS: -Xmx1g TERM: dumb + + - name: muzzle + run: make muzzle + env: + JVM_OPTS: -Xmx1g + TERM: dumb From bfe6de0e6ce4f57d095380a0406663e41012164f Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 19 Mar 2021 14:42:59 +0100 Subject: [PATCH 4/8] rename Signed-off-by: Pavol Loffay --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 34502a8e2..8d1c80162 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,7 +9,7 @@ on: pull_request: jobs: - smoke-test: + build: runs-on: ubuntu-20.04 steps: # Set fetch-depth: 0 to fetch commit history and tags for use in version calculation From 61ae87bf2b2da9f46bab7768bc8d3c2a933f8017 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 19 Mar 2021 15:00:17 +0100 Subject: [PATCH 5/8] muzzle Signed-off-by: Pavol Loffay --- .github/workflows/build.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8d1c80162..77ead47d5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -37,6 +37,27 @@ jobs: env: JVM_OPTS: -Xmx1g TERM: dumb + muzzle: + runs-on: ubuntu-20.04 + steps: + - name: Check out code + uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + submodules: true + + - name: create checksum file + uses: hypertrace/github-actions/checksum@main + + - name: Cache packages + id: cache-packages + uses: actions/cache@v2 + with: + path: ~/.gradle + key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }} + restore-keys: | + gradle-packages-${{ runner.os }}-${{ github.job }} + gradle-packages-${{ runner.os }} - name: muzzle run: make muzzle From 7950acb147f143c6e1a302ab8cf8129466ff7cf4 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 22 Mar 2021 13:55:59 +0100 Subject: [PATCH 6/8] Fix Signed-off-by: Pavol Loffay --- .github/workflows/release.yaml | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..03d5f7ad3 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,50 @@ +name: build +on: + create: + tags: + - ^[0-9]+\.[0-9]+\.[0-9]+ + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + # Set fetch-depth: 0 to fetch commit history and tags for use in version calculation + - name: Check out code + uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + submodules: true + + - name: create checksum file + uses: hypertrace/github-actions/checksum@main + + - name: Cache packages + id: cache-packages + uses: actions/cache@v2 + with: + path: ~/.gradle + key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }} + restore-keys: | + gradle-packages-${{ runner.os }}-${{ github.job }} + gradle-packages-${{ runner.os }} + + - name: build + run: make build + env: + JVM_OPTS: -Xmx1g + TERM: dumb + + - name: publish to maven + run: ./gradlew publish closeAndReleaseRepository + env: + JVM_OPTS: -Xmx1g + TERM: dumb + + - name: Set release version env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: Create github release + uses: fnkr/github-action-ghr@v1 + run: ghr -t ${GITHUB_TOKEN} -u hypertrace -r javaagent -n "Release ${RELEASE_VERSION}" -b "..." --soft ${RELEASE_VERSION} ./artifacts/ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3f8ef0bf410faaff84dc41b380e0166a9e89e5c1 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 22 Mar 2021 14:10:51 +0100 Subject: [PATCH 7/8] fix Signed-off-by: Pavol Loffay --- .github/workflows/release.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 03d5f7ad3..eaf283aa2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -41,10 +41,10 @@ jobs: TERM: dumb - name: Set release version env - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Create github release - uses: fnkr/github-action-ghr@v1 - run: ghr -t ${GITHUB_TOKEN} -u hypertrace -r javaagent -n "Release ${RELEASE_VERSION}" -b "..." --soft ${RELEASE_VERSION} ./artifacts/ - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: fnkr/github-action-ghr@v1 + run: ghr -t ${GITHUB_TOKEN} -u hypertrace -r javaagent -n "Release ${RELEASE_VERSION}" -b "..." --soft ${RELEASE_VERSION} ./artifacts/ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1eda940e41a594cb65f74aeb0320066e363a15a5 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 22 Mar 2021 14:19:46 +0100 Subject: [PATCH 8/8] Disable Signed-off-by: Pavol Loffay --- .circleci/config.yml | 42 +++++++++++++++++----------------- .github/workflows/release.yaml | 6 ++--- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 19369ea2f..0f29fda3b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -111,24 +111,24 @@ workflows: filters: tags: only: /.*/ - - release-maven-publish: - context: - - hypertrace-publishing - - maven-central-publish - requires: - - build - - muzzle - filters: - branches: - ignore: /.*/ - tags: - only: /^[0-9]+\.[0-9]+\.[0-9]+/ - - release-github-publish: - context: hypertrace-publishing - requires: - - release-maven-publish - filters: - branches: - ignore: /.*/ - tags: - only: /^[0-9]+\.[0-9]+\.[0-9]+/ +# - release-maven-publish: +# context: +# - hypertrace-publishing +# - maven-central-publish +# requires: +# - build +# - muzzle +# filters: +# branches: +# ignore: /.*/ +# tags: +# only: /^[0-9]+\.[0-9]+\.[0-9]+/ +# - release-github-publish: +# context: hypertrace-publishing +# requires: +# - release-maven-publish +# filters: +# branches: +# ignore: /.*/ +# tags: +# only: /^[0-9]+\.[0-9]+\.[0-9]+/ diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index eaf283aa2..3f0de0473 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,11 +1,11 @@ -name: build +name: release on: create: tags: - ^[0-9]+\.[0-9]+\.[0-9]+ jobs: - build: + release: runs-on: ubuntu-20.04 steps: # Set fetch-depth: 0 to fetch commit history and tags for use in version calculation @@ -45,6 +45,6 @@ jobs: - name: Create github release uses: fnkr/github-action-ghr@v1 - run: ghr -t ${GITHUB_TOKEN} -u hypertrace -r javaagent -n "Release ${RELEASE_VERSION}" -b "..." --soft ${RELEASE_VERSION} ./artifacts/ + run: ls ./javaagent/build/libs && ghr -t ${GITHUB_TOKEN} -u hypertrace -r javaagent -n "Release ${RELEASE_VERSION}" -b "..." --soft ${RELEASE_VERSION} ./artifacts/ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}