Skip to content
11 changes: 10 additions & 1 deletion .github/actions/build-sandbox-template/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ runs:
KERNEL_VERSION: "vmlinux-6.1.158"
FIRECRACKER_VERSION: "v1.12.1_a41d3fb"
run: |
echo "--- which go:"
which go
echo "--- go version:"
go version
echo "--- go env:"
go env
echo "--- env:"
env

# Generate an unique build ID for the template for this run
export BUILD_ID=$(uuidgen)

Expand All @@ -18,7 +27,7 @@ runs:
echo "TESTS_SANDBOX_TEMPLATE_ID=${TEMPLATE_ID}" >> .env.test
echo "TESTS_SANDBOX_BUILD_ID=${BUILD_ID}" >> .env.test

sudo -E make -C packages/orchestrator build-template \
make -C packages/orchestrator build-template \
ARTIFACTS_REGISTRY_PROVIDER=Local \
STORAGE_PROVIDER=Local \
TEMPLATE_ID=${TEMPLATE_ID} \
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/deploy-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ runs:
uses: google-github-actions/setup-gcloud@v2

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
uses: hashicorp/setup-terraform@v4
with:
terraform_version: 1.5.7

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/host-init/init-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ mkdir -p /fc-vm
envd_dir="/fc-envd"
mkdir -p $envd_dir

cp packages/envd/bin/debug/envd "${envd_dir}/."
cp packages/envd/bin/envd "${envd_dir}/."

chmod -R 755 $envd_dir
ls -lh $envd_dir
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-request-same-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
- name: Get GitHub App installation token
id: app
uses: actions/create-github-app-token@v1
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.E2B_GH_APP_AUTO_REQUEST_SAME_SITE_APP_ID }}
private-key: ${{ secrets.E2B_GH_APP_AUTO_REQUEST_SAME_SITE_APP_PRIVATE_KEY }}
Expand Down
28 changes: 26 additions & 2 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,36 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v5

- name: Build Packages
uses: ./.github/actions/build-packages
- name: Download packages
uses: actions/download-artifact@v8
with:
merge-multiple: 'true'

- name: Move packages back where the run scripts expect them to be
run: |
for f in api client-proxy envd orchestrator; do
mkdir -p "./packages/$f/bin"
mv "$f" "./packages/$f/bin/$f"
done

- name: Initialize Host
uses: ./.github/actions/host-init

- name: Setup Go
uses: ./.github/actions/go-setup-cache
with:
cache-dependency-paths: |
go.work
packages/orchestrator/go.mod
packages/orchestrator/go.sum
tests/integration/go.mod
tests/integration/go.sum

- name: Debug
run: |
which go
go version

- name: Build Template
uses: ./.github/actions/build-sandbox-template

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: wistia/parse-tool-versions@v2.1.1

- name: golangci-lint ${{ matrix.modules }}
uses: golangci/golangci-lint-action@v8
uses: golangci/golangci-lint-action@v9
with:
version: "v${{ env.GOLANGCI_LINT }}"
working-directory: ${{ matrix.modules }}
37 changes: 37 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build all packages

on:
workflow_call:

permissions:
contents: read

jobs:
build-package:
runs-on: ubuntu-24.04
strategy:
matrix:
package:
- name: orchestrator
- name: api
- name: envd
- name: client-proxy

steps:
- uses: actions/checkout@v6

- name: Setup Go
uses: ./.github/actions/go-setup-cache
with:
cache-dependency-paths: |
go.work
packages/${{ matrix.package.name }}/go.mod
packages/${{ matrix.package.name }}/go.sum

- name: Build package
run: make -C packages/${{ matrix.package.name }} build-debug

- uses: actions/upload-artifact@v7
with:
name: ${{ matrix.package.name }}-build
path: packages/${{ matrix.package.name }}/bin/${{ matrix.package.name }}
4 changes: 2 additions & 2 deletions .github/workflows/pr-no-generated-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Generate GitHub App installation token
id: app-token
if: ${{ inputs.commit == true }}
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.app_id }}
private-key: ${{ secrets.app_secret }}
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Setup Go
uses: ./.github/actions/go-setup-cache

- uses: hashicorp/setup-terraform@v3
- uses: hashicorp/setup-terraform@v4
with:
terraform_version: "${{ env.TERRAFORM }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
uses: wistia/parse-tool-versions@v2.1.1

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
uses: hashicorp/setup-terraform@v4
with:
terraform_version: "${{ env.TERRAFORM }}"

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ jobs:
uses: ./.github/workflows/out-of-order-migrations.yml
unit-tests:
uses: ./.github/workflows/pr-tests.yml
build:
uses: ./.github/workflows/pr-build.yml
integration-tests:
needs: [out-of-order-migrations]
needs: [out-of-order-migrations, build]
uses: ./.github/workflows/integration_tests.yml
with:
# Only publish the results for same-repo PRs
Expand Down
2 changes: 1 addition & 1 deletion packages/envd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o bin/envd ${LDFLAGS}

build-debug:
CGO_ENABLED=1 go build -race -gcflags=all="-N -l" -o bin/debug/envd ${LDFLAGS}
CGO_ENABLED=1 go build -race -gcflags=all="-N -l" -o bin/envd ${LDFLAGS}

start-docker:
make build
Expand Down
9 changes: 9 additions & 0 deletions packages/orchestrator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ test-docker:

.PHONY: build-template
build-template:
echo "--- which go:"
which go
echo "--- go version:"
go version
echo "--- go env:"
go env
echo "--- env:"
env

TEMPLATE_BUCKET_NAME=$(TEMPLATE_BUCKET_NAME) \
GOOGLE_SERVICE_ACCOUNT_BASE64=$(GOOGLE_SERVICE_ACCOUNT_BASE64) \
DOCKER_AUTH_BASE64=$(DOCKER_AUTH_BASE64) \
Expand Down
Loading