-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from kris7t/rules
Refinement rule support
- Loading branch information
Showing
73 changed files
with
3,646 additions
and
2,272 deletions.
There are no files selected for viewing
610 changes: 305 additions & 305 deletions
610
.yarn/releases/yarn-4.2.2.cjs → .yarn/releases/yarn-4.3.0.cjs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
|
||
FROM base AS cli-base | ||
# Layer with platform-dependent dependencies, slow changing. | ||
ADD --link cli_lib /app/lib | ||
|
||
FROM cli-base AS cli-amd64 | ||
# Layer with platform-dependent startup script containing references to all | ||
# dependency versions. | ||
ADD --link cli_amd64_bin /app/bin | ||
|
||
FROM cli-base AS cli-arm64 | ||
# Layer with platform-dependent startup script containing references to all | ||
# dependency versions. | ||
ADD --link cli_arm64_bin /app/bin | ||
|
||
FROM cli-$TARGETARCH | ||
# Layer with platform-independent application jars. | ||
ADD --link cli_app_lib /app/lib | ||
# Common settings added on top. | ||
ENV REFINERY_LIBRARY_PATH=/data | ||
USER 1000 | ||
WORKDIR /data | ||
ENTRYPOINT ["/app/bin/refinery-generator-cli"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
|
||
FROM base AS web-base | ||
# Layer with platform-dependent dependencies, slow changing. | ||
ADD --link web_lib /app/lib | ||
|
||
FROM web-base AS web-amd64 | ||
# Layer with platform-dependent startup script containing references to all | ||
# dependency versions. | ||
ADD --link web_amd64_bin /app/bin | ||
|
||
FROM web-base AS web-arm64 | ||
# Layer with platform-dependent startup script containing references to all | ||
# dependency versions. | ||
ADD --link web_arm64_bin /app/bin | ||
|
||
FROM web-$TARGETARCH | ||
# Layer with platform-independent application jars. | ||
ADD --link web_app_lib /app/lib | ||
# Common settings added on top. | ||
ENV REFINERY_LISTEN_HOST=0.0.0.0 REFINERY_LISTEN_PORT=8888 | ||
EXPOSE 8888 | ||
USER 1000 | ||
WORKDIR /app | ||
ENTRYPOINT ["/app/bin/refinery-language-web"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,55 @@ | ||
#!/usr/bin/env bash | ||
|
||
# SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
# SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/> | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
|
||
set -euo pipefail | ||
|
||
(cd .. && ./gradlew :refinery-language-web:distTar) | ||
(cd .. && ./gradlew distTar) | ||
|
||
refinery_version="$(grep '^version=' ../gradle.properties | cut -d'=' -f2)" | ||
distribution_name="refinery-language-web-${refinery_version}" | ||
rm -rf "${distribution_name}" dist app_lib app_{amd64,arm64}_bin lib lib_{amd64,arm64} | ||
cli_distribution_name="refinery-generator-cli-${refinery_version}" | ||
web_distribution_name="refinery-language-web-${refinery_version}" | ||
|
||
tar -xf "../subprojects/language-web/build/distributions/${distribution_name}.tar" | ||
mv "${distribution_name}" dist | ||
mkdir -p app_lib app_{amd64,arm64}_bin lib lib_{amd64,arm64} | ||
rm -rf "${cli_distribution_name}" "${web_distribution_name}" {cli,web}_dist \ | ||
{cli,web}_{,app_}lib common_{,amd64_,arm64_}lib {cli,web}_{amd64,arm64}_bin | ||
|
||
tar -xf "../subprojects/generator-cli/build/distributions/${cli_distribution_name}.tar" | ||
mv "${cli_distribution_name}" cli_dist | ||
tar -xf "../subprojects/language-web/build/distributions/${web_distribution_name}.tar" | ||
mv "${web_distribution_name}" web_dist | ||
mkdir -p {cli,web}_{,app_}lib common_{,amd64_,arm64_}lib {cli,web}_{amd64,arm64}_bin | ||
|
||
# Our application itself is very small, so it will get added as the last layer | ||
# of both containers. | ||
mv cli_dist/lib/refinery-* cli_app_lib | ||
mv web_dist/lib/refinery-* web_app_lib | ||
|
||
for i in cli_dist/lib/*; do | ||
j="web${i#cli}" | ||
if [[ -f "$j" ]]; then | ||
mv "$i" "common_lib${i#cli_dist/lib}" | ||
rm "$j" | ||
fi | ||
done | ||
|
||
# Move architecture-specific jars to their repsective directories. | ||
mv dist/lib/ortools-linux-x86-64-*.jar lib_amd64 | ||
mv dist/lib/ortools-linux-aarch64-*.jar lib_arm64 | ||
rm dist/lib/ortools-{darwin,win32}-*.jar | ||
mv common_lib/ortools-linux-x86-64-*.jar common_amd64_lib | ||
mv common_lib/ortools-linux-aarch64-*.jar common_arm64_lib | ||
rm common_lib/ortools-{darwin,win32}-*.jar | ||
# Move the applications jars for the dependencies into a separate Docker layer | ||
# to enable faster updates. | ||
mv dist/lib/refinery-* app_lib | ||
mv dist/lib/* lib | ||
mv cli_dist/lib/* cli_lib | ||
mv web_dist/lib/* web_lib | ||
# Omit references to jars not present for the current architecture from the | ||
# startup scripts. | ||
sed 's/:\$APP_HOME\/lib\/ortools-\(darwin\|win32\|linux-aarch64\)[^:]\+\.jar//g' dist/bin/refinery-language-web > app_amd64_bin/refinery-language-web | ||
sed 's/:\$APP_HOME\/lib\/ortools-\(darwin\|win32\|linux-x86-64\)[^:]\+\.jar//g' dist/bin/refinery-language-web > app_arm64_bin/refinery-language-web | ||
chmod a+x app_{amd64,arm64}_bin/refinery-language-web | ||
rm -rf dist | ||
|
||
docker buildx build . \ | ||
--platform linux/amd64,linux/arm64 \ | ||
--output "type=image,\"name=ghcr.io/graphs4value/refinery:${refinery_version},ghcr.io/graphs4value/refinery:latest\",push=true,annotation-index.org.opencontainers.image.source=https://github.com/graphs4value/refinery,annotation-index.org.opencontainers.image.description=Refinery: an efficient graph solver for generating well-formed models,annotation-index.org.opencontainers.image.licenses=EPL-2.0" \ | ||
--label 'org.opencontainers.image.source=https://github.com/graphs4value/refinery' \ | ||
--label 'org.opencontainers.image.description=Refinery: an efficient graph solver for generating well-formed models' \ | ||
--label 'org.opencontainers.image.licenses=EPL-2.0' | ||
sed 's/:\$APP_HOME\/lib\/ortools-\(darwin\|win32\|linux-aarch64\)[^:]\+\.jar//g' cli_dist/bin/refinery-generator-cli > cli_amd64_bin/refinery-generator-cli | ||
sed 's/:\$APP_HOME\/lib\/ortools-\(darwin\|win32\|linux-x86-64\)[^:]\+\.jar//g' cli_dist/bin/refinery-generator-cli > cli_arm64_bin/refinery-generator-cli | ||
chmod a+x cli_{amd64,arm64}_bin/refinery-generator-cli | ||
sed 's/:\$APP_HOME\/lib\/ortools-\(darwin\|win32\|linux-aarch64\)[^:]\+\.jar//g' web_dist/bin/refinery-language-web > web_amd64_bin/refinery-language-web | ||
sed 's/:\$APP_HOME\/lib\/ortools-\(darwin\|win32\|linux-x86-64\)[^:]\+\.jar//g' web_dist/bin/refinery-language-web > web_arm64_bin/refinery-language-web | ||
chmod a+x web_{amd64,arm64}_bin/refinery-language-web | ||
rm -rf {cli,web}_dist | ||
|
||
REFINERY_VERSION="${refinery_version}" docker buildx bake -f docker-bake.hcl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
|
||
variable "REFINERY_VERSION" { | ||
default = "" | ||
} | ||
|
||
group "default" { | ||
targets = ["cli", "web"] | ||
} | ||
|
||
target "base" { | ||
dockerfile = "Dockerfile.base" | ||
platforms = ["linux/amd64", "linux/arm64"] | ||
output = ["type=cacheonly"] | ||
} | ||
|
||
target "cli" { | ||
dockerfile = "Dockerfile.cli" | ||
platforms = ["linux/amd64", "linux/arm64"] | ||
output = [ | ||
"type=image,\"name=ghcr.io/graphs4value/refinery:cli-${REFINERY_VERSION},ghcr.io/graphs4value/refinery:cli\",push=true,annotation-index.org.opencontainers.image.source=https://github.com/graphs4value/refinery,annotation-index.org.opencontainers.image.description=Refinery: an efficient graph solver for generating well-formed models,annotation-index.org.opencontainers.image.licenses=EPL-2.0" | ||
] | ||
contexts = { | ||
base = "target:base" | ||
} | ||
} | ||
|
||
target "web" { | ||
dockerfile = "Dockerfile.web" | ||
platforms = ["linux/amd64", "linux/arm64"] | ||
output = [ | ||
"type=image,\"name=ghcr.io/graphs4value/refinery:${REFINERY_VERSION},ghcr.io/graphs4value/refinery:latest\",push=true,annotation-index.org.opencontainers.image.source=https://github.com/graphs4value/refinery,annotation-index.org.opencontainers.image.description=Refinery: an efficient graph solver for generating well-formed models,annotation-index.org.opencontainers.image.licenses=EPL-2.0" | ||
] | ||
contexts = { | ||
base = "target:base" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#This file is generated by updateDaemonJvm | ||
toolchainVersion=21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/> | ||
|
||
SPDX-License-Identifier: CC0-1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.