diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..9e2df63f62 --- /dev/null +++ b/.github/workflows/build.yml @@ -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 }}" \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..073931eec3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/testcontainers-integration-tests.yml b/.github/workflows/testcontainers-integration-tests.yml index 5a28cdff1a..8b4e89bbe9 100644 --- a/.github/workflows/testcontainers-integration-tests.yml +++ b/.github/workflows/testcontainers-integration-tests.yml @@ -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: