From e15c2203443616f83ad9029cb10fcc6e1fcfc9f2 Mon Sep 17 00:00:00 2001 From: platinummonkey Date: Wed, 29 Apr 2026 11:25:03 -0500 Subject: [PATCH 1/2] ci: migrate from CircleCI to GitHub Actions Replaces .circleci/config.yml with a GitHub Actions workflow that runs the same build/test/bench steps across Go 1.15, 1.16, and stable. Actions are pinned to commit SHAs with version tags as comments. Co-Authored-By: Claude Opus 4.7 (1M context) --- .circleci/config.yml | 47 ------------------------------------- .github/workflows/build.yml | 42 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 47 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/build.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 1fc92b7..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,47 +0,0 @@ -version: 2 - -jobs: - "golang-1.15": - docker: - - image: circleci/golang:1.15 - steps: - - checkout - - run: 'sudo apt-get update' - - run: 'sudo apt-get install -y zlib1g-dev' - - run: 'wget https://github.com/DataDog/zstd/files/2246767/mr.zip' - - run: 'unzip mr.zip' - - run: 'go build' - - run: 'PAYLOAD=`pwd`/mr go test -v' - - run: 'PAYLOAD=`pwd`/mr go test -bench .' - "golang-1.16": - docker: - - image: circleci/golang:1.16 - steps: - - checkout - - run: 'sudo apt-get update' - - run: 'sudo apt-get install -y zlib1g-dev' - - run: 'wget https://github.com/DataDog/zstd/files/2246767/mr.zip' - - run: 'unzip mr.zip' - - run: 'go build' - - run: 'PAYLOAD=`pwd`/mr go test -v' - - run: 'PAYLOAD=`pwd`/mr go test -bench .' - "golang-latest": - docker: - - image: circleci/golang:latest - steps: - - checkout - - run: 'sudo apt-get update' - - run: 'sudo apt-get install -y zlib1g-dev' - - run: 'wget https://github.com/DataDog/zstd/files/2246767/mr.zip' - - run: 'unzip mr.zip' - - run: 'go build' - - run: 'PAYLOAD=`pwd`/mr go test -v' - - run: 'PAYLOAD=`pwd`/mr go test -bench .' - -workflows: - version: 2 - build: - jobs: - - "golang-1.15" - - "golang-1.16" - - "golang-latest" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..489a8d0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: build + +on: + push: + branches: [master] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + go-version: ["1.15", "1.16", "stable"] + name: golang-${{ matrix.go-version }} + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Set up Go ${{ matrix.go-version }} + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + with: + go-version: ${{ matrix.go-version }} + + - name: Install zlib + run: | + sudo apt-get update + sudo apt-get install -y zlib1g-dev + + - name: Download test payload + run: | + wget https://github.com/DataDog/zstd/files/2246767/mr.zip + unzip mr.zip + + - name: Build + run: go build + + - name: Test + run: PAYLOAD=`pwd`/mr go test -v + + - name: Benchmark + run: PAYLOAD=`pwd`/mr go test -bench . From e421e390994ab70b5cf88f55077056ba646ca3a8 Mon Sep 17 00:00:00 2001 From: platinummonkey Date: Wed, 29 Apr 2026 11:27:27 -0500 Subject: [PATCH 2/2] ci: chain apt commands and use $() in workflow Chain apt-get update with the install via && so install is skipped if update fails, and replace backtick command substitution with $() in the test/benchmark PAYLOAD assignments. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/build.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 489a8d0..5c34f32 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,9 +23,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Install zlib - run: | - sudo apt-get update - sudo apt-get install -y zlib1g-dev + run: sudo apt-get update && sudo apt-get install -y zlib1g-dev - name: Download test payload run: | @@ -36,7 +34,7 @@ jobs: run: go build - name: Test - run: PAYLOAD=`pwd`/mr go test -v + run: PAYLOAD=$(pwd)/mr go test -v - name: Benchmark - run: PAYLOAD=`pwd`/mr go test -bench . + run: PAYLOAD=$(pwd)/mr go test -bench .