diff --git a/.github/workflows/backend-test.yml b/.github/workflows/backend-test.yml index b462d11907..63fcc8fee9 100644 --- a/.github/workflows/backend-test.yml +++ b/.github/workflows/backend-test.yml @@ -13,38 +13,58 @@ on: - "backend/**" - ".github/workflows/backend-test.yml" +defaults: + run: + working-directory: ./backend + jobs: cargo_test: runs-on: ubicloud-standard-8 - container: - image: ghcr.io/windmill-labs/backend-tests services: postgres: image: postgres + ports: + - 5432:5432 env: POSTGRES_DB: windmill POSTGRES_PASSWORD: changeme - options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: "9.0.x" + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + - uses: actions/setup-go@v2 + with: + go-version: 1.21.5 + - uses: actions/setup-python@v2 + with: + python-version: 3.11 + - uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.1.38 + - uses: astral-sh/setup-uv@v4 + with: + version: "0.4.18" - uses: actions-rust-lang/setup-rust-toolchain@v1 with: + cache-workspaces: backend toolchain: 1.80.0 - # - uses: Swatinem/rust-cache@v2 - # with: - # workspaces: | - # backend - # backend -> target + - uses: Swatinem/rust-cache@v2 + with: + workspaces: backend - name: cargo test - timeout-minutes: 15 + timeout-minutes: 16 run: - /usr/bin/deno --version && /usr/bin/bun -v && go version && - /usr/local/bin/python3 --version && mkdir frontend/build && cd backend - && touch windmill-api/openapi-deref.yaml && - DATABASE_URL=postgres://postgres:changeme@postgres:5432/windmill - DISABLE_EMBEDDING=true RUST_LOG=info cargo test --features - enterprise,deno_core,license,http_trigger,zip,oauth2,python,rust --all -- - --nocapture + deno --version && bun -v && go version && python3 --version && + SQLX_OFFLINE=true + DATABASE_URL=postgres://postgres:changeme@localhost:5432/windmill + DISABLE_EMBEDDING=true RUST_LOG=info PYTHON_PATH=$(which python) + DENO_PATH=$(which deno) BUN_PATH=$(which bun) GO_PATH=$(which go) + UV_PATH=$(which uv) cargo test --features + enterprise,deno_core,license,python,rust --all -- --nocapture diff --git a/.github/workflows/build-staging-image.yml b/.github/workflows/build-staging-image.yml deleted file mode 100644 index 6aa18fe0b8..0000000000 --- a/.github/workflows/build-staging-image.yml +++ /dev/null @@ -1,70 +0,0 @@ -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -name: Build windmill-staging -on: - workflow_dispatch: - -permissions: write-all - -jobs: - build_ee: - runs-on: ubicloud - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Read EE repo commit hash - run: | - echo "ee_repo_ref=$(cat ./backend/ee-repo-ref.txt)" >> "$GITHUB_ENV" - - - uses: actions/checkout@v4 - with: - repository: windmill-labs/windmill-ee-private - path: ./windmill-ee-private - ref: ${{ env.ee_repo_ref }} - token: ${{ secrets.WINDMILL_EE_PRIVATE_ACCESS }} - fetch-depth: 0 - - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 - - uses: depot/setup-action@v1 - - - name: Docker meta - id: meta-ee-public - uses: docker/metadata-action@v5 - with: - images: | - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-staging-ee - flavor: | - latest=false - tags: | - type=sha - type=ref,event=branch - - - name: Login to registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Substitute EE code - run: | - ./backend/substitute_ee_code.sh --copy --dir ./windmill-ee-private - - - name: Build and push publicly ee - uses: depot/build-push-action@v1 - with: - context: . - platforms: linux/amd64,linux/arm64 - push: true - build-args: | - features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,deno_core,license,http_trigger,zip,oauth2,kafka,php,mysql,mssql,bigquery,websocket,python,smtp,csharp,static_frontend,rust - tags: | - ${{ steps.meta-ee-public.outputs.tags }} - labels: | - ${{ steps.meta-ee-public.outputs.labels }} - org.opencontainers.image.licenses=Windmill-Enterprise-License diff --git a/.github/workflows/build_ws.yml b/.github/workflows/build_ws.yml index cccab8bea0..1bcc677482 100644 --- a/.github/workflows/build_ws.yml +++ b/.github/workflows/build_ws.yml @@ -19,7 +19,10 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: depot/setup-action@v1 + # - uses: depot/setup-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Docker meta id: meta uses: docker/metadata-action@v5 @@ -40,7 +43,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push publicly - uses: depot/build-push-action@v1 + uses: docker/build-push-action@v6 with: context: . file: ./docker/DockerfileMultiplayer diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 1df6422d78..0c4955c925 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,9 +1,11 @@ env: REGISTRY: ghcr.io IMAGE_NAME: - ${{ github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch' && github.repository || 'windmill-labs/windmill-test' }} + ${{ github.event_name != 'pull_request' && github.event_name != + 'workflow_dispatch' && github.repository || 'windmill-labs/windmill-test' }} DEV_SHA: - ${{ github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch' && 'dev' || github.event.inputs.tag }} + ${{ github.event_name != 'pull_request' && github.event_name != + 'workflow_dispatch' && 'dev' || github.event.inputs.tag || 'test' }} name: Build windmill:main on: @@ -17,14 +19,14 @@ on: workflow_dispatch: inputs: ee: - description: 'Build EE image (true, false)' + description: "Build EE image (true, false)" required: false default: false type: boolean tag: - description: 'Tag the image' + description: "Tag the image" required: true - default: 'test' + default: "test" concurrency: group: ${{ github.ref }} @@ -34,8 +36,8 @@ permissions: write-all jobs: build: - runs-on: ubicloud - if: (github.event_name != 'workflow_dispatch') || (github.event.inputs && !github.event.inputs.ee) + runs-on: ubicloud-standard-30 + if: (github.event_name != 'workflow_dispatch') || (inputs.ee == false) steps: - uses: actions/checkout@v4 with: @@ -53,9 +55,9 @@ jobs: token: ${{ secrets.WINDMILL_EE_PRIVATE_ACCESS }} fetch-depth: 0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 - - uses: depot/setup-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + # - uses: depot/setup-action@v1 - name: Login to registry uses: docker/login-action@v3 @@ -81,10 +83,9 @@ jobs: type=semver,pattern={{major}}.{{minor}} - name: Build and push publicly - uses: depot/build-push-action@v1 + uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm64 push: true build-args: | features=embedding,parquet,openidconnect,jemalloc,deno_core,license,http_trigger,zip,oauth2,dind,php,mysql,mssql,bigquery,websocket,python,smtp,csharp,static_frontend,rust @@ -94,11 +95,12 @@ jobs: labels: | ${{ steps.meta-public.outputs.labels }} org.opencontainers.image.licenses=AGPLv3 + cache-from: type=gha + cache-to: type=gha - build_ee: - runs-on: ubicloud - if: - (github.event_name != 'workflow_dispatch') || (github.event.inputs.ee) + build_arm: + runs-on: ubicloud-standard-30-arm + if: (github.event_name != 'workflow_dispatch') || (inputs.ee == false) steps: - uses: actions/checkout@v4 with: @@ -116,9 +118,72 @@ jobs: token: ${{ secrets.WINDMILL_EE_PRIVATE_ACCESS }} fetch-depth: 0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 - - uses: depot/setup-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + # - uses: depot/setup-action@v1 + + - name: Login to registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Substitute EE code (EE logic is behind feature flag) + run: | + ./backend/substitute_ee_code.sh --copy --dir ./windmill-ee-private + + - name: Docker meta + id: meta-public + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + flavor: | + latest=false + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + + - name: Build and push publicly + uses: docker/build-push-action@v6 + with: + context: . + push: true + build-args: | + features=embedding,parquet,openidconnect,jemalloc,deno_core,license,http_trigger,zip,oauth2,dind,php,mysql,mssql,bigquery,websocket,python,smtp,csharp,static_frontend,rust + tags: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEV_SHA }} + ${{ steps.meta-public.outputs.tags }} + labels: | + ${{ steps.meta-public.outputs.labels }} + org.opencontainers.image.licenses=AGPLv3 + cache-from: type=gha + cache-to: type=gha + + build_ee: + runs-on: ubicloud + if: (github.event_name != 'workflow_dispatch') || (inputs.ee == true) + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Read EE repo commit hash + run: | + echo "ee_repo_ref=$(cat ./backend/ee-repo-ref.txt)" >> "$GITHUB_ENV" + + - uses: actions/checkout@v4 + with: + repository: windmill-labs/windmill-ee-private + path: ./windmill-ee-private + ref: ${{ env.ee_repo_ref }} + token: ${{ secrets.WINDMILL_EE_PRIVATE_ACCESS }} + fetch-depth: 0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + # - uses: depot/setup-action@v1 - name: Docker meta id: meta-ee-public @@ -144,10 +209,10 @@ jobs: ./backend/substitute_ee_code.sh --copy --dir ./windmill-ee-private - name: Build and push publicly ee - uses: depot/build-push-action@v1 + uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm64 + # platforms: linux/amd64,linux/arm64 push: true build-args: | features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,tantivy,deno_core,license,http_trigger,zip,oauth2,kafka,otel,dind,php,mysql,mssql,bigquery,websocket,python,smtp,csharp,static_frontend,rust @@ -157,7 +222,72 @@ jobs: labels: | ${{ steps.meta-ee-public.outputs.labels }} org.opencontainers.image.licenses=Windmill-Enterprise-License + cache-from: type=gha + cache-to: type=gha + build_ee_arm: + runs-on: ubicloud + if: (github.event_name != 'workflow_dispatch') || (inputs.ee == true) + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Read EE repo commit hash + run: | + echo "ee_repo_ref=$(cat ./backend/ee-repo-ref.txt)" >> "$GITHUB_ENV" + + - uses: actions/checkout@v4 + with: + repository: windmill-labs/windmill-ee-private + path: ./windmill-ee-private + ref: ${{ env.ee_repo_ref }} + token: ${{ secrets.WINDMILL_EE_PRIVATE_ACCESS }} + fetch-depth: 0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + # - uses: depot/setup-action@v1 + + - name: Docker meta + id: meta-ee-public + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee + flavor: | + latest=false + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + + - name: Login to registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Substitute EE code + run: | + ./backend/substitute_ee_code.sh --copy --dir ./windmill-ee-private + + - name: Build and push publicly ee + uses: docker/build-push-action@v6 + with: + context: . + # platforms: linux/amd64,linux/arm64 + push: true + build-args: | + features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,tantivy,deno_core,license,http_trigger,zip,oauth2,kafka,otel,dind,php,mysql,mssql,bigquery,websocket,python,smtp,csharp,static_frontend,rust + tags: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:${{ env.DEV_SHA }} + ${{ steps.meta-ee-public.outputs.tags }} + labels: | + ${{ steps.meta-ee-public.outputs.labels }} + org.opencontainers.image.licenses=Windmill-Enterprise-License + cache-from: type=gha + cache-to: type=gha build_ee_312: runs-on: ubicloud if: ${{ startsWith(github.ref, 'refs/tags/v') }} @@ -178,9 +308,9 @@ jobs: token: ${{ secrets.WINDMILL_EE_PRIVATE_ACCESS }} fetch-depth: 0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 - - uses: depot/setup-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + # - uses: depot/setup-action@v1 - name: Docker meta id: meta-ee-public-py312 @@ -206,10 +336,10 @@ jobs: ./backend/substitute_ee_code.sh --copy --dir ./windmill-ee-private - name: Build and push publicly ee - uses: depot/build-push-action@v1 + uses: docker/build-push-action@v1 with: context: . - platforms: linux/amd64 + # platforms: linux/amd64 push: true build-args: | features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,tantivy,deno_core,license,http_trigger,zip,oauth2,kafka,otel,dind,php,mysql,mssql,bigquery,websocket,python,smtp,csharp,static_frontend,rust @@ -219,6 +349,8 @@ jobs: labels: | ${{ steps.meta-ee-public-py312.outputs.labels }} org.opencontainers.image.licenses=Windmill-Enterprise-License + cache-from: type=gha + cache-to: type=gha # disabled until we make it 100% reliable and add more meaningful tests # playwright: @@ -342,7 +474,7 @@ jobs: # ${{ steps.extract-ee.outputs.destination }}/* run_integration_test: - runs-on: ubicloud + runs-on: ubicloud-standard-8 needs: [build_ee] steps: - uses: actions/checkout@v4 @@ -353,7 +485,7 @@ jobs: run: cd integration_tests && ./build.sh - name: Test run if: ${{ ! startsWith(github.ref, 'refs/tags/v') }} - timeout-minutes: 15 + timeout-minutes: 16 env: LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }} run: cd integration_tests && ./run.sh @@ -453,16 +585,17 @@ jobs: needs: [build_ee] runs-on: ubicloud if: - (github.event_name != 'pull_request') && (github.event_name != 'workflow_dispatch') + (github.event_name != 'pull_request') && (github.event_name != + 'workflow_dispatch') steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - - uses: depot/setup-action@v1 + # - uses: depot/setup-action@v1 - name: Docker meta id: meta-ee-public @@ -487,10 +620,61 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push publicly ee - uses: depot/build-push-action@v1 + uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm64 + # platforms: linux/amd64,linux/arm64 + push: true + file: "./docker/DockerfileNsjail" + tags: | + ${{ steps.meta-ee-public.outputs.tags }} + labels: | + ${{ steps.meta-ee-public.outputs.labels }} + org.opencontainers.image.licenses=Windmill-Enterprise-License + + build_ee_nsjail_arm: + needs: [build_ee_arm] + runs-on: ubicloud + if: + (github.event_name != 'pull_request') && (github.event_name != + 'workflow_dispatch') + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + # - uses: depot/setup-action@v1 + + - name: Docker meta + id: meta-ee-public + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee-nsjail + flavor: | + latest=false + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=sha,enable=true,priority=100,prefix=,suffix=,format=short + type=ref,event=branch + type=ref,event=pr + + - name: Login to registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push publicly ee + uses: docker/build-push-action@v6 + with: + context: . + # platforms: linux/amd64,linux/arm64 push: true file: "./docker/DockerfileNsjail" tags: | @@ -507,10 +691,10 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - - uses: depot/setup-action@v1 + # - uses: depot/setup-action@v1 - name: Login to registry uses: docker/login-action@v3 @@ -531,10 +715,54 @@ jobs: type=sha,enable=true,priority=100,prefix=,suffix=,format=short - name: Build and push publicly ee reports - uses: depot/build-push-action@v1 + uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm64 + # platforms: linux/amd64,linux/arm64 + push: true + file: "./docker/DockerfileReports" + tags: | + ${{ steps.meta-ee-public.outputs.tags }} + labels: | + ${{ steps.meta-ee-public.outputs.labels }} + org.opencontainers.image.licenses=Windmill-Enterprise-License + + build_ee_reports_privately_arm: + needs: [build_ee_nsjail_arm] + runs-on: ubicloud + if: github.event_name != 'pull_request' + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + # - uses: depot/setup-action@v1 + + - name: Login to registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker meta + id: meta-ee-public + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee-reports + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=sha,enable=true,priority=100,prefix=,suffix=,format=short + + - name: Build and push publicly ee reports + uses: docker/build-push-action@v6 + with: + context: . + # platforms: linux/amd64,linux/arm64 push: true file: "./docker/DockerfileReports" tags: | @@ -544,9 +772,11 @@ jobs: org.opencontainers.image.licenses=Windmill-Enterprise-License publish_ecr_s3: - needs: [build_ee_nsjail] + needs: [build_ee_nsjail_arm] runs-on: ubicloud-standard-2-arm - if: (github.event_name != 'pull_request') && (github.event_name != 'workflow_dispatch') + if: + (github.event_name != 'pull_request') && (github.event_name != + 'workflow_dispatch') env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -590,16 +820,16 @@ jobs: build_ee_cuda: if: ${{ startsWith(github.ref, 'refs/tags/v') }} needs: [build_ee] - runs-on: ubicloud + runs-on: ubicloud-standard-16 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - - uses: depot/setup-action@v1 + # - uses: depot/setup-action@v1 - name: Docker meta id: meta-ee-public @@ -619,10 +849,10 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push publicly ee - uses: depot/build-push-action@v1 + uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64 + # platforms: linux/amd64 push: true file: "./docker/DockerfileCuda" tags: | @@ -640,10 +870,10 @@ jobs: with: fetch-depth: 0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - - uses: depot/setup-action@v1 + # - uses: depot/setup-action@v1 - name: Docker meta id: meta-ee-public @@ -663,10 +893,10 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push publicly ee - uses: depot/build-push-action@v1 + uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64 + # platforms: linux/amd64 push: true file: "./docker/DockerfileSlim" tags: | @@ -683,10 +913,10 @@ jobs: with: fetch-depth: 0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - - uses: depot/setup-action@v1 + # - uses: depot/setup-action@v1 - name: Docker meta id: meta-ee-public @@ -706,10 +936,10 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push publicly ee - uses: depot/build-push-action@v1 + uses: docker/build-push-action@v1 with: context: . - platforms: linux/amd64 + # platforms: linux/amd64 push: true file: "./docker/DockerfileSlimEe" tags: | @@ -727,10 +957,10 @@ jobs: with: fetch-depth: 0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - - uses: depot/setup-action@v1 + # - uses: depot/setup-action@v1 - name: Docker meta id: meta-public @@ -750,10 +980,53 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push publicly - uses: depot/build-push-action@v1 + uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm64 + # platforms: linux/amd64,linux/arm64 + push: true + file: "./docker/DockerfileFull" + tags: | + ${{ steps.meta-public.outputs.tags }} + labels: | + ${{ steps.meta-public.outputs.labels }} + + build_full_arm: + if: ${{ startsWith(github.ref, 'refs/tags/v') }} + needs: [build_arm] + runs-on: ubicloud + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + # - uses: depot/setup-action@v1 + + - name: Docker meta + id: meta-public + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-full + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + + - name: Login to registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push publicly + uses: docker/build-push-action@v6 + with: + context: . + # platforms: linux/amd64,linux/arm64 push: true file: "./docker/DockerfileFull" tags: | @@ -770,10 +1043,8 @@ jobs: with: fetch-depth: 0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 - - - uses: depot/setup-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Docker meta id: meta-ee-public @@ -793,10 +1064,52 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push publicly ee - uses: depot/build-push-action@v1 + uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm64 + # platforms: linux/amd64,linux/arm64 + push: true + file: "./docker/DockerfileFullEe" + tags: | + ${{ steps.meta-ee-public.outputs.tags }} + labels: | + ${{ steps.meta-ee-public.outputs.labels }} + org.opencontainers.image.licenses=Windmill-Enterprise-License + + build_ee_full_arm: + if: ${{ startsWith(github.ref, 'refs/tags/v') }} + needs: [build_ee_arm] + runs-on: ubicloud + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Docker meta + id: meta-ee-public + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee-full + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + + - name: Login to registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push publicly ee + uses: docker/build-push-action@v6 + with: + context: . + # platforms: linux/amd64,linux/arm64 push: true file: "./docker/DockerfileFullEe" tags: | diff --git a/Dockerfile b/Dockerfile index ef2f7a721e..ccc8643223 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,6 @@ RUN apt-get -y update \ RUN rustup component add rustfmt RUN CARGO_NET_GIT_FETCH_WITH_CLI=true cargo install cargo-chef --version ^0.1 -RUN cargo install sccache --version ^0.8 -ENV RUSTC_WRAPPER=sccache SCCACHE_DIR=/backend/sccache WORKDIR /windmill @@ -50,9 +48,7 @@ FROM rust_base AS planner COPY ./openflow.openapi.yaml /openflow.openapi.yaml COPY ./backend ./ -RUN --mount=type=cache,target=/usr/local/cargo/registry \ - --mount=type=cache,target=$SCCACHE_DIR,sharing=locked \ - CARGO_NET_GIT_FETCH_WITH_CLI=true cargo chef prepare --recipe-path recipe.json +RUN CARGO_NET_GIT_FETCH_WITH_CLI=true cargo chef prepare --recipe-path recipe.json FROM rust_base AS builder ARG features="" @@ -63,9 +59,7 @@ RUN apt-get update && apt-get install -y libxml2-dev=2.9.* libxmlsec1-dev=1.2.* apt-get clean && \ rm -rf /var/lib/apt/lists/* -RUN --mount=type=cache,target=/usr/local/cargo/registry \ - --mount=type=cache,target=$SCCACHE_DIR,sharing=locked \ - CARGO_NET_GIT_FETCH_WITH_CLI=true RUST_BACKTRACE=1 cargo chef cook --release --features "$features" --recipe-path recipe.json +RUN CARGO_NET_GIT_FETCH_WITH_CLI=true RUST_BACKTRACE=1 cargo chef cook --release --features "$features" --recipe-path recipe.json COPY ./openflow.openapi.yaml /openflow.openapi.yaml COPY ./backend ./ @@ -76,9 +70,7 @@ COPY --from=frontend /frontend/build /frontend/build COPY --from=frontend /backend/windmill-api/openapi-deref.yaml ./windmill-api/openapi-deref.yaml COPY .git/ .git/ -RUN --mount=type=cache,target=/usr/local/cargo/registry \ - --mount=type=cache,target=$SCCACHE_DIR,sharing=locked \ - CARGO_NET_GIT_FETCH_WITH_CLI=true cargo build --release --features "$features" +RUN CARGO_NET_GIT_FETCH_WITH_CLI=true cargo build --release --features "$features" FROM ${PYTHON_IMAGE}