From 55907411c52cc6d88a164ab56717221f183f67d9 Mon Sep 17 00:00:00 2001 From: LexLuthr Date: Fri, 12 Jul 2024 13:43:42 +0400 Subject: [PATCH] test self-hosted --- .github/actions/container-builder/action.yaml | 48 ------------- .github/workflows/ci.yml | 22 +++--- .github/workflows/container-build.yml | 71 ------------------- 3 files changed, 11 insertions(+), 130 deletions(-) delete mode 100644 .github/actions/container-builder/action.yaml delete mode 100644 .github/workflows/container-build.yml diff --git a/.github/actions/container-builder/action.yaml b/.github/actions/container-builder/action.yaml deleted file mode 100644 index 93fa70ccb..000000000 --- a/.github/actions/container-builder/action.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: Build -description: Build tag and optionally push container images -inputs: - name: - required: true - type: string - target: - required: false - type: string - file: - required: false - type: string - context: - required: false - type: string - default: '.' - build-args: - required: false - type: string - push: - required: false - type: boolean - default: false -runs: - using: "composite" - steps: - - name: Extract metadata for ${{ inputs.name }} - id: meta - uses: docker/metadata-action@v4 - with: - images: ghcr.io/${{ github.repository }} - flavor: latest=false - tags: | - type=semver,pattern={{version}},prefix=${{ inputs.name }}- - type=ref,event=branch,prefix=${{ inputs.name }}- - type=sha,prefix=${{ inputs.name }}- - - name: Build ${{ inputs.name }} - uses: docker/build-push-action@v4 - with: - context: ${{ inputs.context }} - cache-from: type=gha,scope=${{ inputs.name }} - cache-to: type=gha,mode=max,scope=${{ inputs.name }} - push: ${{ inputs.push }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - file: ${{ inputs.file }} - target: ${{ inputs.target }} - build-args: ${{ inputs.build-args }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38e5f4588..ccc431214 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ env: jobs: setup-params: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 @@ -47,7 +47,7 @@ jobs: run: echo "Cache saved" setup-deps: - runs-on: ubuntu-latest + runs-on: self-hosted outputs: make_deps_key: ${{ steps.make_deps.outputs.key }} make_deps_path: ${{ steps.make_deps.outputs.path }} @@ -101,7 +101,7 @@ jobs: path: ${{ steps.make_deps.outputs.path }} build-all: - runs-on: ubuntu-latest + runs-on: self-hosted needs: [setup-deps] steps: - uses: actions/checkout@v4 @@ -127,7 +127,7 @@ jobs: shell: bash test: - runs-on: ubuntu-latest + runs-on: self-hosted needs: [setup-params, setup-deps] strategy: matrix: @@ -188,7 +188,7 @@ jobs: lint: needs: [setup-deps] - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 @@ -219,7 +219,7 @@ jobs: shell: bash gofmt: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 @@ -245,7 +245,7 @@ jobs: shell: bash cbor-check: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 @@ -278,7 +278,7 @@ jobs: shell: bash docs-check: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 @@ -307,7 +307,7 @@ jobs: shell: bash gen-check: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 @@ -340,7 +340,7 @@ jobs: shell: bash lid-docker-compose: - runs-on: ubuntu-latest + runs-on: self-hosted needs: [setup-params, setup-deps] steps: - uses: actions/checkout@v4 @@ -377,7 +377,7 @@ jobs: shell: bash mod-tidy-check: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/container-build.yml b/.github/workflows/container-build.yml deleted file mode 100644 index e09cfd63b..000000000 --- a/.github/workflows/container-build.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Build - -on: - push: - branches: - - 'main' - tags: - - 'v*' - pull_request: - -jobs: - build: - name: Containers - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - env: - LOTUS_VERSION: 'v1.27.0' - LOTUS_SOURCE_IMAGE: 'ghcr.io/filecoin-shipyard/lotus-containers:lotus' - NETWORK_NAME: 'devnet' - FFI_BUILD_FROM_SOURCE: '0' - DOCKER_BUILDKIT: '1' - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Update Boost modules - run: make build/.update-modules - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - platforms: linux/amd64,linux/arm64 - - name: Log in to the Container registry - uses: docker/login-action@v2 - if: ${{ github.event_name != 'pull_request' }} - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build boost-dev - uses: ./.github/actions/container-builder - with: - name: boost-dev - file: docker/devnet/Dockerfile.source - target: boost-dev - push: ${{ github.event_name != 'pull_request' }} - build-args: | - LOTUS_TEST_IMAGE=${{ env.LOTUS_SOURCE_IMAGE }}-${{ env.LOTUS_VERSION }}-${{ env.NETWORK_NAME }} - FFI_BUILD_FROM_SOURCE=${{ env.FFI_BUILD_FROM_SOURCE }} - - name: Build booster-http-dev - uses: ./.github/actions/container-builder - with: - name: booster-http-dev - file: docker/devnet/Dockerfile.source - target: booster-http-dev - push: ${{ github.event_name != 'pull_request' }} - build-args: | - LOTUS_TEST_IMAGE=${{ env.LOTUS_SOURCE_IMAGE }}-${{ env.LOTUS_VERSION }}-${{ env.NETWORK_NAME }} - FFI_BUILD_FROM_SOURCE=${{ env.FFI_BUILD_FROM_SOURCE }} - - name: Build booster-bitswap-dev - uses: ./.github/actions/container-builder - with: - name: booster-bitswap-dev - file: docker/devnet/Dockerfile.source - target: booster-bitswap-dev - push: ${{ github.event_name != 'pull_request' }} - build-args: | - LOTUS_TEST_IMAGE=${{ env.LOTUS_SOURCE_IMAGE }}-${{ env.LOTUS_VERSION }}-${{ env.NETWORK_NAME }} - FFI_BUILD_FROM_SOURCE=${{ env.FFI_BUILD_FROM_SOURCE }}