diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..a5bd3e8a77 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: Build +on: + pull_request: + # TODO: Remove workflow_dispatch later + workflow_dispatch: +jobs: + build: + name: Linux + runs-on: ubuntu-latest + container: grafana/alloy-build-image:v0.1.8 + strategy: + matrix: + os: [linux] + include: + - os: linux + arch: amd64 + - os: linux + arch: arm64 + - os: linux + arch: ppc64le + - os: linux + arch: s390x + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Go 1.23 + uses: actions/setup-go@v5 + - run: make generate-ui + - run: GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= \ + make alloy diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a952cc5a05..8cf86214ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,13 +7,32 @@ on: branches: - main pull_request: + # TODO: Remove workflow_dispatch later + workflow_dispatch: jobs: - test: - name: Test - strategy: - matrix: - platform: [macos-latest-xlarge] - runs-on: ${{ matrix.platform }} + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Go 1.23 + uses: actions/setup-go@v5 + - run: sudo apt-get update -y && sudo apt-get install -y libsystemd-dev + - run: make lint + test_linux: + name: Test Linux + runs-on: ubuntu-latest + container: grafana/alloy-build-image:v0.1.8 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Go 1.23 + uses: actions/setup-go@v5 + - run: make GO_TAGS="nodocker" test + test_macos: + name: Test MacOS + runs-on: macos-latest-xlarge steps: - name: Checkout code uses: actions/checkout@v4