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/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 000000000..77ead47d5 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,66 @@ +name: build +on: + push: + branches: + - main + paths-ignore: + - '**/README.md' + - 'smoke-tests/matrix' + pull_request: + +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 + 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 + env: + JVM_OPTS: -Xmx1g + TERM: dumb diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..3f0de0473 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,50 @@ +name: release +on: + create: + tags: + - ^[0-9]+\.[0-9]+\.[0-9]+ + +jobs: + release: + 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: 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 }} 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