Skip to content

Commit

Permalink
feat: tooling and bcr support
Browse files Browse the repository at this point in the history
- feat: add bazel ci presubmit
- chore: add CLA, DCO docs
- chore: add PR template
- chore: add dependency review config
- chore: drop outdated travis config
- chore: readme updates
  • Loading branch information
sgammon committed Aug 13, 2023
1 parent f369a80 commit 3c18a1b
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 63 deletions.
30 changes: 30 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
matrix:
platform:
- centos7
- debian10
- ubuntu2004
- macos
- windows
tasks:
build_native:
name: Build native image
platform: ${{ platform }}
build_targets:
- '@rules_graalvm//example/native'

bcr_test_module:
module_path: example/integration_tests/bzlmod
matrix:
platform:
- centos7
- debian10
- ubuntu2004
- macos
- windows
tasks:
run_test_module:
name: Run test module
platform: ${{ platform }}
build_targets:
- //sample

30 changes: 30 additions & 0 deletions .github/CLA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Elide Contributor License Agreement

> Version `1.0`
In order to clarify the intellectual property license granted with Contributions from any person or entity, Elide Ventures LLC ("Elide") must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Elide; it does not change your rights to use your own Contributions for any other purpose.
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Elide. Except for the license granted herein to Elide and recipients of software distributed by Elide, You reserve all right, title, and interest in and to Your Contributions.

## Definitions.

"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Elide. 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, including any modifications or additions to an existing work, that is intentionally submitted by You to Elide for inclusion in, or documentation of, any of the products owned or managed by Elide (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to Elide 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, Elide 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."

## Grant of Copyright License

Subject to the terms and conditions of this Agreement, You hereby grant to Elide and to recipients of software distributed by Elide a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.

## Grant of Patent License

Subject to the terms and conditions of this Agreement, You hereby grant to Elide and to recipients of software distributed by Elide 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.

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 Elide, or that your employer has executed a separate Corporate CLA with Elide.

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.

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.

Should You wish to submit work that is not Your original creation, You may submit it to Elide 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 "Submitted on behalf of a third-party: [named here]".

You agree to notify Elide of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect
34 changes: 34 additions & 0 deletions .github/DCO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Summary

Add a summary about your PR here.

- [ ] feat: task list here

## Changelog

- feat(cli): added a thing
- fix(dev): fixed a thing
- chore: updated → `1.0`
2 changes: 2 additions & 0 deletions .github/dco.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require:
members: false
16 changes: 16 additions & 0 deletions .github/dependency-review-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
license-check: true
vulnerability-check: true
fail-on-severity: "low"

fail-on-severity: low
allow-licenses:
- GPL-3.0
- BSD-3-Clause
- MIT
- Apache-2.0

deny-licenses:
- LGPL-2.0
- BSD-2-Clause

allow-ghsas: []
70 changes: 40 additions & 30 deletions .github/workflows/on.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,45 @@ on:
pull_request: {}

jobs:
test:
name: "Test (${{ matrix.label }})"
uses: ./.github/workflows/module.test.yml
strategy:
fail-fast: false
matrix:
runner: [ubuntu-latest, windows-latest, macos-latest]
bzlmod: [false]
include:
- runner: ubuntu-latest
label: Ubuntu / Standard
labs: false
- runner: ubuntu-latest
label: Ubuntu / Bzlmod
bzlmod: true
labs: true
- runner: windows-latest
label: Windows
bzlmod: false
labs: true
- runner: macos-latest
label: macOS
bzlmod: false
labs: false

secrets: inherit
dependency-review:
name: "Dependency Review"
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: Dependency Review
uses: actions/dependency-review-action@v3
with:
runner: ${{ matrix.runner }}
label: ${{ matrix.label }}
bzlmod: ${{ matrix.bzlmod }}
labs: ${{ matrix.labs }}
config-file: './.github/dependency-review-config.yml'

test:
name: "Test (${{ matrix.label }})"
uses: ./.github/workflows/module.test.yml
strategy:
fail-fast: false
matrix:
runner: [ubuntu-latest, windows-latest, macos-latest]
bzlmod: [false]
include:
- runner: ubuntu-latest
label: Ubuntu / Standard
labs: false
- runner: ubuntu-latest
label: Ubuntu / Bzlmod
bzlmod: true
labs: true
- runner: windows-latest
label: Windows
bzlmod: false
labs: true
- runner: macos-latest
label: macOS
bzlmod: false
labs: false

secrets: inherit
with:
runner: ${{ matrix.runner }}
label: ${{ matrix.label }}
bzlmod: ${{ matrix.bzlmod }}
labs: ${{ matrix.labs }}
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module(
name = "rules_graalvm",
version = "0.9.0",
compatibility_level = 1,
)

GRAALVM_SDK_VERSION = "23.0.1"
Expand Down
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# `rules_graalvm`
# GraalVM Rules for Bazel

[![CI](https://github.com/sgammon/rules_graalvm/actions/workflows/on.push.yml/badge.svg)](https://github.com/sgammon/rules_graalvm/actions/workflows/on.push.yml)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4-ff69b4.svg)](CODE_OF_CONDUCT.md)
![Bazel 7](https://img.shields.io/badge/Bazel%207-black?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0My41NyA0My4zNyI%2BCiAgPGRlZnM%2BCiAgICA8c3R5bGU%2BCiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogIzAwNDMwMDsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjMDA3MDFhOwogICAgICB9CgogICAgICAuY2xzLTMgewogICAgICAgIGZpbGw6ICM0M2EwNDc7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgZmlsbDogIzc2ZDI3NTsKICAgICAgfQogICAgPC9zdHlsZT4KICA8L2RlZnM%2BCiAgPGcgaWQ9IkxheWVyXzEtMiIgZGF0YS1uYW1lPSJMYXllciAxIj4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMiIgZD0ibTIxLjc4LDMyLjY4djEwLjY5bC0xMC44OS0xMC44OXYtMTAuNjlsMTAuODksMTAuODlaIi8%2BCiAgICA8cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0yMS43OCwzMi42OGwxMC45LTEwLjg5djEwLjY5bC0xMC45LDEwLjg5di0xMC42OVoiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0ibTEwLjg5LDIxLjc5djEwLjY5TDAsMjEuNTh2LTEwLjY5bDEwLjg5LDEwLjlaIi8%2BCiAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Im00My41NywxMC44OXYxMC42OWwtMTAuODksMTAuOXYtMTAuNjlsMTAuODktMTAuOVoiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0ibTIxLjc4LDMyLjY4bC0xMC44OS0xMC44OSwxMC44OS0xMC45LDEwLjksMTAuOS0xMC45LDEwLjg5WiIvPgogICAgPHBhdGggY2xhc3M9ImNscy00IiBkPSJtMTAuODksMjEuNzlMMCwxMC44OSwxMC44OSwwbDEwLjg5LDEwLjg5LTEwLjg5LDEwLjlaIi8%2BCiAgICA8cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Im0zMi42OCwyMS43OWwtMTAuOS0xMC45TDMyLjY4LDBsMTAuODksMTAuODktMTAuODksMTAuOVoiLz4KICA8L2c%2BCjwvc3ZnPg%3D%3D&logoColor=gray)
![Bzlmod](https://img.shields.io/badge/Bzlmod-black?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0My41NyA0My4zNyI%2BCiAgPGRlZnM%2BCiAgICA8c3R5bGU%2BCiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogIzAwNDMwMDsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjMDA3MDFhOwogICAgICB9CgogICAgICAuY2xzLTMgewogICAgICAgIGZpbGw6ICM0M2EwNDc7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgZmlsbDogIzc2ZDI3NTsKICAgICAgfQogICAgPC9zdHlsZT4KICA8L2RlZnM%2BCiAgPGcgaWQ9IkxheWVyXzEtMiIgZGF0YS1uYW1lPSJMYXllciAxIj4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMiIgZD0ibTIxLjc4LDMyLjY4djEwLjY5bC0xMC44OS0xMC44OXYtMTAuNjlsMTAuODksMTAuODlaIi8%2BCiAgICA8cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0yMS43OCwzMi42OGwxMC45LTEwLjg5djEwLjY5bC0xMC45LDEwLjg5di0xMC42OVoiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0ibTEwLjg5LDIxLjc5djEwLjY5TDAsMjEuNTh2LTEwLjY5bDEwLjg5LDEwLjlaIi8%2BCiAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Im00My41NywxMC44OXYxMC42OWwtMTAuODksMTAuOXYtMTAuNjlsMTAuODktMTAuOVoiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0ibTIxLjc4LDMyLjY4bC0xMC44OS0xMC44OSwxMC44OS0xMC45LDEwLjksMTAuOS0xMC45LDEwLjg5WiIvPgogICAgPHBhdGggY2xhc3M9ImNscy00IiBkPSJtMTAuODksMjEuNzlMMCwxMC44OSwxMC44OSwwbDEwLjg5LDEwLjg5LTEwLjg5LDEwLjlaIi8%2BCiAgICA8cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Im0zMi42OCwyMS43OWwtMTAuOS0xMC45TDMyLjY4LDBsMTAuODksMTAuODktMTAuODksMTAuOVoiLz4KICA8L2c%2BCjwvc3ZnPg%3D%3D&logoColor=gray)

----

> Latest release: `0.9.0`
> **Important**
Expand Down Expand Up @@ -126,6 +124,17 @@ native_image(
)
```

## Acknowledgements
## Legalese

The project license is available at the root of the repository. Project files will (or do) carry a copyright header.

### Acknowledgements

Built on top of [Andy Scott's](https://github.com/andyscott) fantastic work with [rules_graal](https://github.com/andyscott/rules_graal). This fork is licensed Apache 2.0 like that one is, but the copyright has changed.

### Copyright

Copyright © 2023, Elide Ventures, LLC. All contributors from the fork-point onward must provide [DCO][1] and [CLA][2].

Built on top of @andyscott's fantastic work with [rules_graal](https://github.com/andyscott/rules_graal).
[1]: ./.github/DCO.md
[2]: ./.github/CLA.md

0 comments on commit 3c18a1b

Please sign in to comment.