Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How about adding a ci which automatic build shared library? #116

Closed
zemyblue opened this issue Jul 20, 2023 · 0 comments · Fixed by #119
Closed

How about adding a ci which automatic build shared library? #116

zemyblue opened this issue Jul 20, 2023 · 0 comments · Fixed by #119
Assignees
Labels
good first issue Good for newcomers

Comments

@zemyblue
Copy link
Member

Summary

Add a CI which automatic build the shared libraries.

Motivation

The shared libraries are referenced by other project like finschia for building.
we need to compile shared library every commit is added if we want to apply the changes of wasmvm, but it doesn't seems to do that often. So I propose adding CI to automatically build the shared libraries.

The cosmwasm/wasmvm already do auto commit it.
https://github.com/CosmWasm/wasmvm/blob/1638725b25d799f078d053391945399cb35664b1/.circleci/config.yml#L282-L322

  deploy_to_git:
    machine:
      image: ubuntu-2004:2022.10.1
    resource_class: xlarge
    steps:
      - add_ssh_keys:
          fingerprints:
            # Custom read/write deployment key with private key stored on CircleCI
            # (see https://app.circleci.com/settings/project/github/CosmWasm/wasmvm/ssh and https://github.com/CosmWasm/wasmvm/settings/keys)
            - "31:de:e5:84:1b:12:81:94:aa:06:50:c0:cb:bd:79:f0"
      - checkout
      - run:
          name: Build shared library for Linux
          command: make release-build-linux
      - run:
          name: Build shared library for macOS
          command: make release-build-macos
      # Shared libraries for Windows (.dll) currently do not work (https://github.com/CosmWasm/wasmvm/issues/389)
      # and .dll builds are not deterministic.
      # Deactivating this step to avoid polluting the git hostory.
      #
      # - run:
      #     name: Build shared library for Windows
      #     command: make release-build-windows
      - run:
          name: Debug build results
          command: ls -l ./internal/api
      - run:
          name: Configure git user
          # This is not a GitHub user and no permissions can be configured other than "push access", which
          # we can configure for Deploy keys at https://github.com/CosmWasm/wasmvm/settings/keys
          command: |
            git config user.email "wasmvm@circleci.confio.example.com"
            git config user.name "Deployer"
      - run:
          name: Check-in and push new libraries
          command: |
            git status
            git add ./internal/api
            git commit --allow-empty -m '[skip ci] Built release libraries'
            git push origin $CIRCLE_BRANCH

Proposal

  • If new commit is added in main branch, a CI automatically detect and add new PR which compile the shared libraries and change it. -> if there is no changed in the shared libraries to build, do not this.
  • if the all test of the PR are passed, do auto-merge.
@zemyblue zemyblue added the good first issue Good for newcomers label Jul 20, 2023
@170210 170210 self-assigned this Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants