Skip to content

Commit

Permalink
WIP Build Matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
jamlo committed Oct 25, 2024
1 parent 71c6d74 commit d3e192e
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 6 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build Binaries

on:
workflow_call:

jobs:
build:
name: Build Binary
runs-on: ubuntu-latest
outputs:
status: ${{ job.status }}
strategy:
matrix:
include:
- os: linux
goarch: amd64
- os: linux
goarch: arm64
- os: linux
goarch: armv7
- os: linux
goarch: armv6
- os: darwin
goarch: amd64
- os: darwin
goarch: arm64
- os: windows
goarch: amd64

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: go.work

- name: Build
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.goarch }}
PRIVATE_KEY_PASSPHRASE: ${{ secrets.PRIVATE_KEY_PASSPHRASE }}
run: |
# Add Keys to expected files
touch /tmp/private.pem
touch /tmp/public.pem
chmod 600 /tmp/private.pem
chmod 600 /tmp/public.pem
echo "${{ secrets.PRIVATE_PEM }}" > /tmp/private.pem
echo "${{ secrets.PUBLIC_PEM }}" > /tmp/public.pem
# Start build
echo "Building bacalhau binary for: ${GOOS} ${GOARCH}"
make build-bacalhau-tgz
echo "Built bacalhau binary for: ${GOOS} ${GOARCH}"
ls -lh dist/
- name: Upload binary artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.goarch }}
path: "dist/bacalhau_*"
retention-days: 1 # Short retention since these are intermediate artifacts

- name: Report build status
if: always()
run: |
echo "Build completed for ${{ matrix.os }}-${{ matrix.goarch }}"
echo "Status: ${{ job.status }}"
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI Pipeline

on:
push:
branches: ["eng-292/jamlo/improve-go-linting-in-ci"]
# pull_request:
# branches: [main]
# repository_dispatch:
# types: [ok-to-test]

jobs:
build:
uses: ./.github/workflows/build.yml

integration-tests:
needs: build
if: success()
uses: ./.github/workflows/testcontainers-integration-tests.yml
7 changes: 1 addition & 6 deletions .github/workflows/testcontainers-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: Test Containers Integration Tests

on:
push:
branches: [main]
pull_request:
branches: [main]
repository_dispatch:
types: [ok-to-test]
workflow_call:

jobs:
test-build-and-run-testcontainers:
Expand Down

0 comments on commit d3e192e

Please sign in to comment.