8000 test · grafana/alloy@a5f94d9 · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ptodev committed Feb 13, 2025
1 parent a093112 commit a5f94d9
Showing 1 changed file with 35 additions and 13 deletions.
48 changes: 35 additions & 13 deletions .github/workflows/build.yml
8000
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ concurrency:

jobs:

setup-environment:
runs-on: ubuntu-latest
setup-environment-unix:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest-xlarge]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -39,14 +42,32 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: go mod download
setup-environment-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go 1.23
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- name: Cache Go
id: go-cache
uses: actions/cache@v4.2.0
with:
path: |
~\AppData\Local\go-build
~\go\pkg\mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
lint:
name: Lint
runs-on: ubuntu-latest
needs: setup-environment
needs: setup-environment-unix
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -75,7 +96,7 @@ jobs:
test_linux:
name: Test Linux
runs-on: ubuntu-latest
needs: setup-environment
needs: setup-environment-unix
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -134,7 +155,7 @@ jobs:
build_linux:
name: Build on Linux
runs-on: ubuntu-latest
needs: setup-environment
needs: setup-environment-unix
container: grafana/alloy-build-image:v0.1.8
strategy:
matrix:
Expand Down Expand Up @@ -178,7 +199,7 @@ jobs:
build_linux_boringcrypto:
name: Build on Linux (boringcrypto)
runs-on: ubuntu-latest
needs: setup-environment
needs: setup-environment-unix
container: grafana/alloy-build-image:v0.1.8-boringcrypto
strategy:
matrix:
Expand Down Expand Up @@ -222,7 +243,7 @@ jobs:
build_mac_intel:
name: Build on MacOS (Intel)
runs-on: macos-14-large
needs: setup-environment
needs: setup-environment-unix
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -251,7 +272,7 @@ jobs:
build_mac_arm:
name: Build on MacOS (ARM)
runs-on: macos-14-xlarge
needs: setup-environment
needs: setup-environment-unix
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -280,7 +301,7 @@ jobs:
build_windows:
name: Build on Windows (AMD64)
runs-on: windows-latest
needs: setup-environment
needs: setup-environment-windows
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -298,6 +319,7 @@ jobs:
# Windows won't restore the Linux cache because
# Linux uses different line breaks and the hashes don't match.
# TODO: Change the line breaks on Windows? Or just leave it as it is?
# If it uses the same line breaks it can use setup-environment-unix.
id: go-cache
uses: actions/cache@v4.2.0
with:
Expand All @@ -316,7 +338,7 @@ jobs:
build_freebsd:
name: Build on FreeBSD (AMD64)
runs-on: ubuntu-latest
needs: setup-environment
needs: setup-environment-unix
container: grafana/alloy-build-image:v0.1.8
steps:
- name: Install zstd
Expand Down

0 comments on commit a5f94d9

Please sign in to comment.
0