build(deps): update dependency @alwaysmeticulous/recorder-loader to v2.186.0 #21533
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Snap | |
on: | |
push: | |
branches: | |
- main | |
- release-* | |
pull_request: | |
branches: | |
- main | |
- release-* | |
merge_group: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
# renovate: datasource=go depName=github.com/goreleaser/goreleaser | |
GORELEASER_VERSION: v1.26.2 | |
# renovate: datasource=npm depName=pnpm versioning=npm | |
PNPM_VERSION: '8.15.9' | |
permissions: | |
contents: write | |
jobs: | |
skip-check: | |
name: Skip check | |
continue-on-error: true | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
outputs: | |
should_skip: ${{ steps.skip-check.outputs.should_skip }} | |
permissions: | |
actions: write | |
contents: read | |
steps: | |
- id: skip-check | |
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1 | |
with: | |
do_not_skip: '["schedule", "workflow_dispatch"]' | |
paths: |- | |
[ | |
"**.go", | |
".github/workflows/snap.yml", | |
".go-version", | |
".node-version", | |
"cmd/**", | |
"gen/**", | |
"go.mod", | |
"go.sum", | |
"pkg/**", | |
"ui/**" | |
] | |
skip_after_successful_duplicate: false | |
build: | |
name: Build Snap (goreleaser) | |
needs: skip-check | |
if: ${{ needs.skip-check.outputs.should_skip != 'true' }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
permissions: | |
contents: read | |
env: | |
DOCKER_CLI_EXPERIMENTAL: "enabled" | |
steps: | |
- name: Remove unnecessary files | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version-file: .go-version | |
check-latest: true | |
cache: true | |
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
- name: Set up Node.js | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version-file: .node-version | |
cache: 'pnpm' | |
cache-dependency-path: ui/pnpm-lock.yaml | |
- name: Set up Snapcraft | |
run: | | |
sudo snap install snapcraft --channel=7.x/stable --classic | |
# See https://github.com/goreleaser/goreleaser/issues/1715 | |
mkdir -p "$HOME/.cache/snapcraft/download" | |
mkdir -p "$HOME/.cache/snapcraft/stage-packages" | |
- name: Set up environment | |
run: | | |
./env.sh | |
- name: Validate | |
uses: goreleaser/goreleaser-action@5fdedb94abba051217030cc86d4523cf3f02243d # v4.6.0 | |
with: | |
distribution: goreleaser | |
version: ${{ env.GORELEASER_VERSION }} | |
args: check | |
- name: Set Tag | |
run: | | |
echo "goreleaser_current_tag=`git describe --match 'v*' --tags`" >> $GITHUB_ENV | |
- name: Dry Run | |
uses: goreleaser/goreleaser-action@5fdedb94abba051217030cc86d4523cf3f02243d # v4.6.0 | |
with: | |
distribution: goreleaser | |
version: ${{ env.GORELEASER_VERSION }} | |
args: release --clean --skip-validate --skip-publish --timeout=60m | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GORELEASER_CURRENT_TAG: "${{ env.goreleaser_current_tag }}" | |
- name: Archive generated artifacts | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: parca-dist-release | |
if-no-files-found: error | |
path: | | |
dist/*.snap | |
test: | |
name: Test Snap | |
needs: build | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: parca-dist-release | |
path: dist | |
- name: Install snapcraft | |
run: | | |
sudo snap install snapcraft --classic --channel=7.x/stable | |
- name: Install snap & invoke parca | |
run: | | |
sudo snap install --dangerous dist/parca*_linux_amd64.snap | |
sudo snap set parca log-level=debug | |
parca --version | |
- name: Start Parca - default config | |
run: | | |
sudo snap start parca | |
# Set some options to allow retries while Parca comes back up | |
CURL_OPTS=(--max-time 20 --retry 5 --retry-delay 3 --retry-connrefused) | |
curl ${CURL_OPTS[@]} http://localhost:7070/ | |
curl ${CURL_OPTS[@]} http://localhost:7070/metrics | |
- name: Configure snap - enable-persistence | |
run: | | |
sudo snap set parca enable-persistence=true | |
sudo snap restart parca | |
# Set some options to allow retries while Parca comes back up | |
CURL_OPTS=(--max-time 20 --retry 5 --retry-delay 3 --retry-connrefused) | |
curl ${CURL_OPTS[@]} http://localhost:7070/ | |
curl ${CURL_OPTS[@]} http://localhost:7070/metrics | |
- name: Configure snap - http-address | |
run: | | |
sudo snap set parca http-address=":8080" | |
sudo snap restart parca | |
# Set some options to allow retries while Parca comes back up | |
CURL_OPTS=(--max-time 20 --retry 5 --retry-delay 3 --retry-connrefused) | |
curl ${CURL_OPTS[@]} http://localhost:8080/ | |
curl ${CURL_OPTS[@]} http://localhost:8080/metrics | |
# In case the above tests fail, dump the logs for inspection | |
- name: Dump snap service logs | |
if: failure() | |
run: | | |
sudo snap logs parca -n=all | |
release-edge: | |
name: Release Snap (latest/edge) | |
needs: test | |
if: ${{ github.event_name != 'pull_request' }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: parca-dist-release | |
path: dist | |
- name: Install snapcraft | |
run: | | |
sudo snap install snapcraft --classic --channel=7.x/stable | |
- name: Release to latest/edge | |
env: | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} | |
run: | | |
snapcraft upload dist/*_amd64.snap --release edge | |
snapcraft upload dist/*_arm64.snap --release edge |