diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 7aefb54..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,134 +0,0 @@ -version: 2.1 - -commands: - test_images: - steps: - - run: - name: Show docker images - command: docker image ls - - run: - name: Test simple-contract (single contract repo) - command: | - cd tests/simple-contract - IMAGE=$(docker images ls --filter 'reference=cosmwasm/optimizer*' --format "{{.Repository}}:{{.Tag}}" | head -n 1) - echo "Testing $IMAGE in $(pwd) ..." - docker run --rm -v "$(pwd)":/code \ - --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \ - --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - "$IMAGE" - - run: - name: Test no-build (single contract repo with no build) - command: | - cd tests/no-build - IMAGE=$(docker images ls --filter 'reference=cosmwasm/optimizer*' --format "{{.Repository}}:{{.Tag}}" | head -n 1) - echo "Testing $IMAGE in $(pwd) ..." - docker run --rm -v "$(pwd)":/code \ - --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \ - --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - "$IMAGE" - - run: - name: Test cw-nfts (workspace) - command: | - curl -sS -L https://github.com/CosmWasm/cw-nfts/archive/refs/tags/v0.16.0.tar.gz > cw-nfts.tar.gz - tar -zxv -f cw-nfts.tar.gz --wildcards - cd cw-nfts-* - IMAGE=$(docker images ls --filter 'reference=cosmwasm/optimizer*' --format "{{.Repository}}:{{.Tag}}" | head -n 1) - echo "Testing $IMAGE in $(pwd) ..." - docker run --rm -v "$(pwd)":/code \ - --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \ - --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - "$IMAGE" - -jobs: - build-amd64: - # Use machine to avoid building on the Remote Docker Environment, which is to weak for us - # (https://circleci.com/docs/building-docker-images/#specifications). - machine: - # https://circleci.com/docs/configuration-reference/#available-linux-machine-images-cloud - image: ubuntu-2204:2022.10.2 - resource_class: large - environment: - BUILDKIT_PROGRESS: plain - steps: - - run: uname -a - - run: - name: Install packages - command: | - sudo apt update - sudo apt install -y git make - - run: - name: Install docker-ce (buildx) - command: | - sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null - sudo apt update - sudo apt install -y docker-ce docker-ce-cli containerd.io - - checkout - - run: - name: Build - command: make build-x86_64 - - test_images - - build-arm64: - machine: - # https://circleci.com/docs/configuration-reference/#available-linux-machine-images-cloud - image: ubuntu-2204:2022.10.2 - resource_class: arm.large - environment: - BUILDKIT_PROGRESS: plain - steps: - - run: uname -a - - run: - name: Install packages - command: | - sudo apt update - sudo apt install -y git make - - run: - name: Install docker-ce (buildx) - command: | - sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null - sudo apt update - sudo apt install -y docker-ce docker-ce-cli containerd.io - - checkout - - run: - name: Build - command: make build-arm64 - - test_images - - lint-scripts: - docker: - - image: ubuntu:20.04 - steps: - - run: - name: Install packages - command: | - apt update - apt install -y git shellcheck - - checkout - - run: - name: Run shellcheck - command: find . -name "*.sh" -exec shellcheck {} + - - format-scripts: - docker: - - image: cimg/go:1.21.3 - steps: - - run: - name: Install shfmt - command: GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@v3.7.0 - - checkout - - run: - name: Run shfmt - command: shfmt --diff . - -workflows: - version: 2 - test-suite: - jobs: - - build-amd64 - - build-arm64 - - lint-scripts - - format-scripts diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..a5b8eb5 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,13 @@ +name: docker_publish + +on: + push: + tags: + - 'v*.*.*' + +jobs: + docker_pipeline: + uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.6.0 + secrets: inherit + with: + publish: true