-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from CircleCI to GitHub Actions
Signed-off-by: Bryce-Souers <[email protected]>
- Loading branch information
1 parent
7d61fee
commit dd02a2a
Showing
8 changed files
with
127 additions
and
143 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
name: CI | ||
on: | ||
- push | ||
- pull_request | ||
jobs: | ||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-24.04 | ||
- windows-2022 | ||
- macos-13 | ||
- macos-14 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Read .promu.yml | ||
uses: pietrobolcato/action-read-yaml@dd664040f4883322f6d143e58302062b35a46e4d | ||
id: read_promu | ||
with: | ||
config: .promu.yml | ||
- name: Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: ${{ steps.read_promu.outputs['go.version'] }} | ||
- run: make build | ||
- run: make test GOOPTS=-v | ||
|
||
build_common: | ||
name: Build common architectures | ||
if: github.event_name == 'pull_request' | ||
strategy: | ||
matrix: | ||
thread: [0, 1, 2] | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Import PromCI | ||
uses: prometheus/[email protected] | ||
- name: Cross-build | ||
uses: ./.github/promci/actions/build | ||
with: | ||
thread: ${{ matrix.thread }} | ||
parallelism: 3 | ||
promu_opts: -p linux/amd64 -p windows/amd64 -p linux/arm64 -p darwin/amd64 -p darwin/arm64 -p linux/386 | ||
|
||
build_all: | ||
name: Build all architectures | ||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v0.')) | ||
strategy: | ||
matrix: | ||
thread: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Import PromCI | ||
uses: prometheus/[email protected] | ||
- name: Cross-build | ||
uses: ./.github/promci/actions/build | ||
with: | ||
thread: ${{ matrix.thread }} | ||
parallelism: 12 | ||
promu_opts: -p linux | ||
|
||
publish_master: | ||
name: Publish master | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
needs: | ||
- test | ||
- build_all | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Import PromCI | ||
uses: prometheus/[email protected] | ||
- name: Publish | ||
uses: ./.github/promci/actions/publish_main | ||
with: | ||
docker_hub_login: ${{ secrets.DOCKER_HUB_LOGIN }} | ||
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
quay_io_login: ${{ secrets.QUAY_IO_LOGIN }} | ||
quay_io_password: ${{ secrets.QUAY_IO_PASSWORD }} | ||
|
||
publish_release: | ||
name: Publish release | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v0.') | ||
needs: | ||
- test | ||
- build_all | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Import PromCI | ||
uses: prometheus/[email protected] | ||
- name: Publish | ||
uses: ./.github/promci/actions/publish_release | ||
with: | ||
github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }} | ||
docker_hub_login: ${{ secrets.DOCKER_HUB_LOGIN }} | ||
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
quay_io_login: ${{ secrets.QUAY_IO_LOGIN }} | ||
quay_io_password: ${{ secrets.QUAY_IO_PASSWORD }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
go: | ||
# Whenever the Go version is updated here, .circle/config.yml should also be updated. | ||
version: 1.23 | ||
version: 1.23 | ||
repository: | ||
path: github.com/prometheus/blackbox_exporter | ||
path: github.com/prometheus/blackbox_exporter | ||
build: | ||
ldflags: | | ||
-X github.com/prometheus/common/version.Version={{.Version}} | ||
-X github.com/prometheus/common/version.Revision={{.Revision}} | ||
-X github.com/prometheus/common/version.Branch={{.Branch}} | ||
-X github.com/prometheus/common/version.BuildUser={{user}}@{{host}} | ||
-X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}} | ||
ldflags: | | ||
-X github.com/prometheus/common/version.Version={{.Version}} | ||
-X github.com/prometheus/common/version.Revision={{.Revision}} | ||
-X github.com/prometheus/common/version.Branch={{.Branch}} | ||
-X github.com/prometheus/common/version.BuildUser={{user}}@{{host}} | ||
-X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}} | ||
tarball: | ||
files: | ||
- blackbox.yml | ||
- LICENSE | ||
- NOTICE | ||
files: | ||
- blackbox.yml | ||
- LICENSE | ||
- NOTICE |
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
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
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
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
Oops, something went wrong.