diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ddca586..3a2b12d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,12 +1,17 @@ -* @jcape @varsha888 @nick-mobilecoin -/Cargo.toml -/Cargo.lock -/LICENSE -/deny.toml +# These lines impact repository security +/.github/CODEOWNERS @varsha888 @jcape @nick-mobilecoin +/.github/settings.yml @varsha888 @jcape @nick-mobilecoin + +# These lines prevent reviews of trivial changes blocking on particular users /.gitattributes /.gitconfig /.gitignore /.markdownlint-cli2.jsonrc /CHANGELOG.md +/Cargo.toml +/Cargo.lock +/LICENSE +/README.md +/deny.toml /rust-toolchain.toml /rustfmt.toml diff --git a/.github/auto_assign.yaml b/.github/auto_assign.yaml deleted file mode 100644 index a480195..0000000 --- a/.github/auto_assign.yaml +++ /dev/null @@ -1,4 +0,0 @@ -addReviewers: true -addAssignees: author -reviewers: - - mobilecoinfoundation/coredev diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml new file mode 100644 index 0000000..1f988e6 --- /dev/null +++ b/.github/auto_assign.yml @@ -0,0 +1,3 @@ +--- +addAssignees: author +runOnDraft: true diff --git a/.github/labeler.yaml b/.github/labeler.yaml deleted file mode 100644 index 6ea1214..0000000 --- a/.github/labeler.yaml +++ /dev/null @@ -1,12 +0,0 @@ -rust: - - '**.rs' - - 'Cargo.lock' - - 'Cargo.toml' - -dependencies: - - 'Cargo.lock' - -github_actions: - - '.github/workflows/**' - - '.github/labeler.yaml' - - '.github/triage-labeler.yaml' diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..e0f9c24 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,20 @@ +--- +rust: + - '**.rs' + - '**/Cargo.lock' + - '**/Cargo.toml' + +github_actions: + - '.github/workflows/**' + - '.github/labeler.yml' + - '.github/triage-labeler.yaml' + - '.github/auto_assign.yml' + +python: + - '**.py' + - '**/poetry.lock' + - '**/pyproject.toml' + - '**/requirements.txt' + +javascript: + - '**.js' diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e2d81e1..8685d92 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,10 +3,3 @@ ### Motivation - -### Future Work - - diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 0000000..4a9827f --- /dev/null +++ b/.github/settings.yml @@ -0,0 +1,117 @@ +--- +repository: + name: "build-rs" + description: "A brief summary of the workspace" + homepage: https://github.com/mobilecoinfoundation/build-rs + topics: "[development-tools::build-utils]" + private: false + has_issues: true + has_projects: false + has_wiki: true + has_downloads: false + default_branch: main + allow_squash_merge: true + allow_merge_commit: false + allow_rebase_merge: false + allow_auto_merge: true + delete_branch_on_merge: true + use_squash_pr_title_as_default: true + enable_automated_security_fixes: true + enable_vulnerability_alerts: true + +labels: + - name: dependencies + color: '#0366d6' + description: Pull requests that update a dependency file + + - name: github_actions + color: '#000000' + description: Pull requests that update github actions + - name: go + color: '#29beb0' + description: Pull requests that update golang code + - name: javascript + color: '#f0db4f' + description: Pull requests that update javascript code + - name: python + color: '#4584b6' + description: Pull requests that update python code + - name: rust + color: '#f74c00' + description: Pull requests that update rust code + + - name: size/XS + color: '#00ed01' + description: Extra-Small PRs + - name: size/S + color: '#3af901' + description: Small PRs + - name: size/M + color: '#cefb02' + description: Medium-sized PRs + - name: size/L + color: '#ffde40' + description: Large PRs + - name: size/XL + color: '#ff9100' + description: Extra-Large PRs + - name: size/XXL + color: '#f24d11' + description: Double-wide PRs + - name: size/OHLAWDHECOMIN + color: '#ed1717' + description: PRs that should get broken down + +collaborators: + - username: meowblecoinbot + permission: triage + - username: varsha888 + permission: admin + - username: jcape + permission: admin + - username: nick-mobilecoin + permission: admin + +teams: + - name: coredev + permission: push + +branches: + - name: main + # https://docs.github.com/en/rest/branches/branch-protection?apiVersion=2022-11-28 + protection: + required_pull_request_reviews: + require_code_owner_reviews: true + required_approving_review_count: 1 + required_conversation_resolution: true + required_status_checks: + strict: false + # These names need to match the matrix job name. + # For example if one had a job like: + # + # build: + # runs-on: ubuntu-22.04 + # needs: + # - lint + # strategy: + # matrix: + # rust: + # - stable + # - beta + # - nightly-2023-01-22 + # + # Then the matrix names would be: + # - "build (stable)" + # - "build (beta)" + # - "build (nightly-2023-01-22)" + contexts: + - lint + - "deny (bans licenses sources)" + - sort + - "clippy (stable)" + - "build (stable)" + - "test (stable)" + - coverage + enforce_admins: true + required_linear_history: true + restrictions: null diff --git a/.github/triage-labeler.yaml b/.github/triage-labeler.yaml index 1aade66..79d7188 100644 --- a/.github/triage-labeler.yaml +++ b/.github/triage-labeler.yaml @@ -1,2 +1,3 @@ +--- needs-triage: - '.*' diff --git a/.github/workflows/cargo-audit.yaml b/.github/workflows/cargo-audit.yaml deleted file mode 100644 index fdb6dbe..0000000 --- a/.github/workflows/cargo-audit.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: cargo-audit -on: - pull_request: - paths: Cargo.lock - push: - branches: main - paths: Cargo.lock - schedule: - - cron: "0 0 * * *" - -jobs: - security_audit: - name: Security Audit - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Cache cargo bin - uses: actions/cache@v3 - with: - path: ~/.cargo/bin - key: ${{ runner.os }}-cargo-audit-v0.12 - - uses: actions-rs/audit-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5f40dc9..4c63aab 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,7 @@ +--- name: ci -on: +"on": push: branches: - 'main' @@ -9,91 +10,185 @@ on: env: CARGO_INCREMENTAL: 0 RUSTFLAGS: "-Dwarnings" - CARGO_UNSTABLE_SPARSE_REGISTRY: true jobs: - rustfmt: + # TODO: Fix automatically + lint: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 + with: + submodules: recursive - uses: dtolnay/rust-toolchain@stable with: components: rustfmt - uses: r7kamura/rust-problem-matchers@v1 - run: cargo fmt --all -- --check + - uses: xt0rted/markdownlint-problem-matcher@v2 + - uses: DavidAnson/markdownlint-cli2-action@v9 + with: + globs: "**/*.md" + # FIXME: Add yamllint problem matcher + - run: yamllint -s . - markdown-lint: + crev: runs-on: ubuntu-22.04 + needs: + - lint + # TODO: once we have enough reviews, make this a required check + continue-on-error: true + permissions: + contents: read + pull-requests: write steps: - uses: actions/checkout@v3 - - uses: xt0rted/markdownlint-problem-matcher@v2 - - uses: DavidAnson/markdownlint-cli2-action@v9 with: - globs: "**/*.md" + submodules: recursive + - uses: dtolnay/rust-toolchain@stable + - uses: actions/cache@v3 + continue-on-error: false + with: + path: | + Cargo.lock + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} + restore-keys: ${{ runner.os }}-cargo- + - uses: taiki-e/install-action@v2 + with: + # Pinning to 0.23 due to + # https://github.com/crev-dev/cargo-crev/issues/598 + tool: cargo-crev@0.23 + - name: Configure Crev + run: | + cargo crev trust \ + --level high \ + --no-commit https://github.com/mobilecoinfoundation/crev-proofs + - name: Run Cargo Crev + id: cargo-crev + run: | + set +e + export MARKER=$RANDOM + echo "UNREVIEWED_DEPENDENCIES<> $GITHUB_OUTPUT + # GH does not like colors in crev output + export TERM=xterm-mono + # - Get a TSV-formatted table of dependencies without reviews + # - Skip any "local" dependencies + # - Convert the table to GHF markdown + # - Sort descending by the "LoC" value (first column preceeds first + # pipe) + + cargo generate-lockfile --offline + cargo crev crate verify \ + --for-id vMr-9g5KzKQLsCpkp1tc8o7AR6a0OptjOICjf7NMyHE \ + --show-all \ + --skip-indirect \ + --skip-verified \ + --skip-known-owners \ + --trust medium \ + --thoroughness medium \ + --understanding medium \ + --redundancy 2 | \ + grep -v '^local ' | \ + awk '{ + printf("| %s | %s | %s | %s | %s | %s | %s |\n", + $14, $15, $2, $10, $11, $12, $13) + }' | \ + sort -t\| -n -k5 | \ + tee /dev/stderr >> $GITHUB_OUTPUT + STATUS=$? + echo "EOF${MARKER}" >> $GITHUB_OUTPUT + + set -e + + # TODO: When we're ready to make this required + # exit $STATUS + exit 0 + shell: bash + - uses: mshick/add-pr-comment@v2 + with: + # yamllint disable rule:line-length + message: | + #### :x: Unreviewed dependencies found + + | Crate | Version | Reviews (N/2) | LoC | Left-Pad Index | Geiger | Flags | + | ----- | ------- | ------------- | --- | -------------- | ------ | ----- | + ${{ steps.cargo-crev.outputs.UNREVIEWED_DEPENDENCIES }} + # yamllint enable rule:line-length deny: runs-on: ubuntu-22.04 needs: - - "rustfmt" - - "markdown-lint" + - lint strategy: matrix: checks: - advisories - bans licenses sources - # Prevent sudden announcement of a new advisory from failing ci: - continue-on-error: ${{ matrix.checks == 'advisories' }} + fail-fast: false steps: - - uses: actions/checkout@v3 - - uses: EmbarkStudios/cargo-deny-action@v1 - with: - command: check ${{ matrix.checks }} + - uses: actions/checkout@v3 + with: + submodules: recursive + - uses: dtolnay/rust-toolchain@stable + - uses: EmbarkStudios/cargo-deny-action@v1 + with: + command: check ${{ matrix.checks }} sort: runs-on: ubuntu-22.04 needs: - - "rustfmt" - - "markdown-lint" + - lint steps: - uses: actions/checkout@v3 + with: + submodules: recursive - uses: dtolnay/rust-toolchain@stable - - run: cargo install cargo-sort - - run: cargo sort --workspace --check >/dev/null + - uses: taiki-e/install-action@v2 + with: + tool: cargo-sort + - run: cargo sort --workspace --grouped --check >/dev/null + # TODO: Fix automatically clippy: runs-on: ubuntu-22.04 needs: - - "rustfmt" - - "markdown-lint" + - lint strategy: matrix: rust: - stable - beta - # Prevent beta clippy warnings from causing CI failure - continue-on-error: ${{ matrix.rust == 'beta' }} + fail-fast: false steps: - uses: actions/checkout@v3 + with: + submodules: recursive - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} components: clippy - uses: r7kamura/rust-problem-matchers@v1 - - run: cargo +${{ matrix.rust }} clippy --all --all-features -- -D warnings + - run: | + cargo +${{ matrix.rust }} clippy --all --all-features -- -D warnings + # TODO: Fix automatically, or post GH-suggestions comments build: runs-on: ubuntu-22.04 needs: - - "rustfmt" - - "markdown-lint" + - lint strategy: matrix: rust: - stable - beta - - nightly-2023-01-04 + - nightly-2023-01-22 steps: - uses: actions/checkout@v3 + with: + submodules: recursive - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} @@ -103,16 +198,17 @@ jobs: test: runs-on: ubuntu-22.04 needs: - - "rustfmt" - - "markdown-lint" + - lint strategy: matrix: rust: - stable - beta - - nightly-2023-01-04 + - nightly-2023-01-22 steps: - uses: actions/checkout@v3 + with: + submodules: recursive - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} @@ -122,8 +218,7 @@ jobs: doc: runs-on: ubuntu-22.04 needs: - - "rustfmt" - - "markdown-lint" + - lint strategy: matrix: rust: @@ -133,6 +228,8 @@ jobs: continue-on-error: ${{ matrix.rust == 'beta' }} steps: - uses: actions/checkout@v3 + with: + submodules: recursive - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} @@ -142,14 +239,17 @@ jobs: coverage: runs-on: ubuntu-22.04 needs: - - "rustfmt" - - "markdown-lint" + - lint steps: - uses: actions/checkout@v3 + with: + submodules: recursive - uses: dtolnay/rust-toolchain@stable with: components: llvm-tools-preview - - uses: taiki-e/install-action@cargo-llvm-cov + - uses: taiki-e/install-action@v2 + with: + tool: cargo-llvm-cov - run: cargo llvm-cov --workspace --lcov --output-path lcov.info - uses: codecov/codecov-action@v3 with: @@ -157,10 +257,9 @@ jobs: notify: runs-on: ubuntu-latest - if: failure() && ${{ github.event_name }} == 'push' + if: github.event_name == 'push' && failure() needs: - - rustfmt - - markdown-lint + - lint - deny - sort - clippy @@ -172,12 +271,18 @@ jobs: - name: Notify Discord on failure uses: sarisia/actions-status-discord@v1 with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} username: "Github Actions" status: Failure + color: 0xff0000 nodetail: true - title: "Workflow: ${{ github.workflow }}" - url: ${{ github.repository_url }}/actions/runs/${{ github.run_id }} - description: | - [@${{ github.pusher }}](${{ github.url }}/${{ github.pusher }}] was the last one to touch ${{ github.repository }}, is all I'm saying... + # yamllint disable rule:line-length + title: "${{ github.repository }} ${{ github.workflow }} has failed on ${{ github.event_name }} to ${{ github.ref_name }}" + url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + description: > + [`@${{ github.actor }}`](${{ github.server_url }}/${{ github.actor }}) + was the last one to touch + [that repository](${{ github.server_url }}/${{ github.repository }}), + is all I'm saying. avatar_url: "https://media0.giphy.com/media/oe33xf3B50fsc/200.gif" - webhook: ${{ secrets.DISCORD_WEBHOOK }} + # yamllint enable rule:line-length diff --git a/.github/workflows/copyright.yaml b/.github/workflows/copyright.yaml index a1b072c..4f1b756 100644 --- a/.github/workflows/copyright.yaml +++ b/.github/workflows/copyright.yaml @@ -1,23 +1,28 @@ +--- name: copyright -on: +"on": schedule: - - cron: '0 3 1 1 *' # 03:00 AM on January 1 + - cron: '0 3 1 1 *' # 03:00 AM on January 1 jobs: update-license-year: runs-on: ubuntu-latest permissions: - pull-requests: write contents: write + pull-requests: write steps: - uses: actions/checkout@v3 - - uses: FantasticFiasco/action-update-license-year@v2 with: - token: ${{ secrets.GITHUB_TOKEN }} + submodules: recursive + - uses: FantasticFiasco/action-update-license-year@v3 + with: + token: ${{ secrets.MEOWBLECOIN_PAT }} path: | **/*.rs **/*.proto + # yamllint disable rule:line-length assignees: '@mobilecoinfoundation/coredev' + # yamllint enable rule:line-length labels: "copyright" transform: (?<=^\/\/ Copyright \(c\) )(?\d{4})?-?(\d{4})? diff --git a/.github/workflows/issues.yaml b/.github/workflows/issues.yaml index 0860d82..1989654 100644 --- a/.github/workflows/issues.yaml +++ b/.github/workflows/issues.yaml @@ -1,6 +1,7 @@ +--- name: issues -on: +"on": issues: types: - opened @@ -10,16 +11,12 @@ jobs: triage: runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v3.1 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/triage-labeler.yaml - enable-versioned-regex: 0 - - add-to-project: - runs-on: ubuntu-latest - steps: + - uses: github/issue-labeler@v3 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/triage-labeler.yaml + enable-versioned-regex: 0 - uses: actions/add-to-project@v0.5.0 with: - github-token: "${{ secrets.ADD_TO_PROJECT_PAT }}" + github-token: "${{ secrets.MEOWBLECOIN_PAT }}" project-url: https://github.com/orgs/mobilecoinfoundation/projects/5 diff --git a/.github/workflows/pr-assign.yaml b/.github/workflows/pr-assign.yaml index 99155a9..099d488 100644 --- a/.github/workflows/pr-assign.yaml +++ b/.github/workflows/pr-assign.yaml @@ -1,6 +1,7 @@ +--- name: pr-assign -on: +"on": pull_request: types: [opened, ready_for_review] @@ -8,8 +9,12 @@ jobs: auto-assign: runs-on: ubuntu-latest permissions: + contents: read pull-requests: write steps: - uses: kentaro-m/auto-assign-action@v1.2.5 + - uses: rowi1de/auto-assign-review-teams@v1.1.3 with: - configuration-path: '.github/auto_assign.yaml' + repo-token: ${{ secrets.MEOWBLECOIN_PAT }} + org: "mobilecoinfoundation" + teams: "coredev" diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index c415788..c97aa8e 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -1,23 +1,21 @@ +--- name: pr -on: +"on": pull_request: jobs: - add-to-project: + update-metadata: runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: + - uses: actions/add-to-project@v0.5.0 with: github-token: "${{ secrets.MEOWBLECOIN_PAT }}" project-url: https://github.com/orgs/mobilecoinfoundation/projects/7 - - size-label: - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - steps: - uses: pascalgn/size-label-action@v0.4.3 env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" @@ -32,14 +30,6 @@ jobs: "1000": "XXL", "1500": "OHLAWDHECOMIN" } - - label: - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - steps: - - uses: actions/labeler@v4 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: ".github/labeler.yaml" + - uses: actions/labeler@v4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.gitignore b/.gitignore index 088ba6b..e7cc362 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,10 @@ # Generated by Cargo # will have compiled files and executables -/target/ +**/target/ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html -Cargo.lock +**/Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk diff --git a/CHANGELOG.md b/CHANGELOG.md index 77322ce..7d49926 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,5 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - ## [Unreleased] - ReleaseDate + + +[Unreleased]: https://github.com/mobilecoinfoundation/build-rs/compare/v0.0.0...HEAD diff --git a/CLA.md b/CLA.md new file mode 100644 index 0000000..3e2d34d --- /dev/null +++ b/CLA.md @@ -0,0 +1,29 @@ +# Contributor License Agreement + +Thank you for your contribution to the MobileCoin project from MoblieCoin Inc. and the MobileCoin Foundation (“MobileCoin”). + +This contributor license agreement documents the rights granted by contributors to MobileCoin. This license is for your protection as a Contributor as well as the protection of MobileCoin, its users, and its licensees; you may still license your own Contributions under other terms. + +In exchange for the ability to participate in the MobileCoin community and for other good consideration, the receipt of which is hereby acknowledged, you accept and agree to the following terms and conditions for Your present and future Contributions submitted to MobileCoin. Except for the license granted herein to MobileCoin and recipients of software distributed by MobileCoin, You reserve all right, title, and interest in and to Your Contributions. + +1. Definitions. + + “You” (or “Your”) shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with MobileCoin. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, “control” means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + “Contribution” shall mean any original work of authorship or invention, including any modifications or additions to an existing work, that is intentionally submitted by You to MobileCoin for inclusion in, or documentation of, any of the products owned or managed by MobileCoin (the “Work”). For the purposes of this definition, “submitted” means any form of electronic, verbal, or written communication sent to MobileCoin or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, MobileCoin for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as “Not a Contribution.” + +1. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to MobileCoin and to recipients of software distributed by MobileCoin a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute Your Contributions and such derivative works, as well as the right to sublicense and have sublicensed all of the foregoing rights, through multiple tiers of sublicensees, provided that in all cases, MobileCoin will make Your Contributions available under an open source license. + + a. Moral Rights. If moral rights apply to the Contribution, to the maximum extent permitted by law, You waive and agree not to assert such moral rights against MobileCoin or its successors in interest, or any of MobileCoin’s licensees, either direct or indirect. + +1. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to MobileCoin and to recipients of software distributed by MobileCoin a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. + +1. You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your contributions to MobileCoin, or that your employer has executed with MobileCoin a separate contributor license agreement substantially similar to this Agreement. + +1. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions. + +1. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of title, non-infringement, merchantability, or fitness for a particular purpose. + +1. Should You wish to submit work that is not Your original creation, You may submit it to MobileCoin separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as “Not a Contribution”. Third-party materials licensed pursuant to: [license name(s) here]” (substituting the bracketed text with the appropriate license name(s)). + +1. You agree to notify MobileCoin of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index dc9b2fc..ef3ca57 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -59,7 +59,7 @@ representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement on [our Discord](https://mobilecoin.chat). +reported to the community leaders responsible for enforcement on [our Discord](https://discord.gg/mobilecoin). All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the diff --git a/Cargo.toml b/Cargo.toml index 1849d36..c4a945e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,7 @@ +# We need to explicitly specify resolver 2. +# We shouldn't have to per https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html, but that does not appear to be the case +resolver = "2" + [package] name = "mc-build-rs" version = "0.1.0" @@ -11,11 +15,7 @@ keywords = ["utility", "cargo", "build"] license = "Apache-2.0" readme = "README.md" repository = "https://github.com/mobilecoinfoundation/build-rs" -rust-version = "1.62.1" - -# We need to explicitly specify resolver 2. -# We shouldn't have to per https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html, but that does not appear to be the case -resolver = "2" +rust-version = "1.68" [profile.release] lto = "thin" @@ -27,12 +27,13 @@ consolidate-commits = true consolidate-pushes = true tag-name = "v{{version}}" -# The file names in this key are relative to the each crate that gets released. -# So we only need one `README.md` entry if all the README's follow a -# common format and are always next to the Cargo.toml for their respective -# package. pre-release-replacements = [ - {file="README.md", search="mc-[a-z-]+/[0-9.]+", replace="{{crate_name}}/{{version}}"}, + { file = "README.md", search = "mc-[a-z-]+/[0-9.]+", replace = "{{crate_name}}/{{version}}" }, + { file = "../../CHANGELOG.md", search = "Unreleased", replace = "{{version}}", min = 1 }, + { file = "../../CHANGELOG.md", search = "\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly = 1 }, + { file = "../../CHANGELOG.md", search = "ReleaseDate", replace= "{{date}}", min = 1 }, + { file = "../../CHANGELOG.md", search = "", replace="\n## [Unreleased] - ReleaseDate\n", exactly = 1 }, + { file = "../../CHANGELOG.md", search = "", replace="\n[Unreleased]: https://github.com/mobilecoinfoundation/sgx-sigstruct/compare/{{tag_name}}...HEAD", exactly = 1 }, ] [dependencies] diff --git a/LICENSE b/LICENSE index 261eeb9..6b0b127 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -199,3 +200,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + diff --git a/README.md b/README.md index 734973c..ff66b84 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Project Chat][chat-image]][chat-link]![License][license-image]![Target][target-image]![Architecture: any][arch-image][![Crates.io][crate-image]][crate-link][![Docs Status][docs-image]][docs-link][![Dependency Status][deps-image]][deps-link]