Skip to content

Commit

Permalink
{WIP} Add scripts to build native binary (using a container)
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed Feb 9, 2024
1 parent 19c0577 commit d903ac7
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2015-2024 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

FROM ghcr.io/graalvm/jdk-community:21
WORKDIR /build/
ADD . /build/

RUN ./mvnw -Pnative -DskipTests package
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,16 @@ Your starting point should be the instance methods of
./mvnw install
```

The _native_ binaries can be built with `./build-natives.sh` and will be available in `TODO`.

## Contributing

Please see [the contributors guide](CONTRIBUTING.md) for details.

## License

```text
Copyright 2015 Google Inc.
Copyright 2015-2024 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
Expand Down
22 changes: 22 additions & 0 deletions build-natives.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2015-2024 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

set -euox pipefail

# TODO Mount some directory as volume so that the native image falls out

docker build --rm .

0 comments on commit d903ac7

Please sign in to comment.