-
Notifications
You must be signed in to change notification settings - Fork 35
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 #128 from LeStarch/v1.0.2
Python Wrapper Package and Automatic Building of Packages
- Loading branch information
Showing
13 changed files
with
612 additions
and
19 deletions.
There are no files selected for viewing
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,48 @@ | ||
name: Build Native Images | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
Build-Native-Images: | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "macos-10.15"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: "Checkout FPP Repository" | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Image Build Step | ||
working-directory: ./compiler | ||
run: | | ||
. ${GITHUB_WORKSPACE}/.github/workflows/env-setup | ||
./release | ||
mv native-fpp-*.tar.gz "${GITHUB_WORKSPACE}" | ||
- name: Publish Release Binaries | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: ${GITHUB_WORKSPACE}/.github/workflows/publish native-fpp-*.tar.gz | ||
Build-PyPI-Package: | ||
needs: Build-Native-Images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout FPP Repository" | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Test PyPI | ||
uses: fprime-community/publish-pypi@main | ||
env: | ||
TWINE_PASSWORD: ${{ secrets.TESTPYPI_CREDENTIAL }} | ||
with: | ||
package: "fprime-fpp" | ||
steps: "sdist" | ||
- name: PyPI | ||
uses: fprime-community/publish-pypi@main | ||
env: | ||
TWINE_PASSWORD: ${{ secrets.PYPI_CREDENTIAL }} | ||
with: | ||
repo: "pypi" | ||
package: "fprime-fpp" | ||
steps: "sdist" |
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,19 @@ | ||
#!/bin/bash | ||
graal_ver="22.1.0" | ||
graal_os="$( uname -s | tr "[:upper:]" "[:lower:]")" | ||
graal_ar="graalvm-ce-java11-${graal_os}-amd64-${graal_ver}.tar.gz" | ||
graal_dir="$(pwd)/graalvm-ce-java11-${graal_ver}" | ||
graal_url="https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${graal_ver}/${graal_ar}" | ||
|
||
# Download Graal | ||
curl -L "${graal_url}" | tar -xz | ||
graal_bin="${graal_dir}/bin" | ||
if [ ! -d "${graal_bin}" ] | ||
then | ||
graal_bin="${graal_dir}/Contents/Home/bin" | ||
fi | ||
export PATH="${graal_bin}:${PATH}" | ||
export GRAALVM_JAVA_HOME="$(dirname ${graal_bin})" | ||
# Install native image | ||
${graal_bin}/gu install native-image | ||
|
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,16 @@ | ||
#!/bin/bash | ||
# | ||
# inputs: path(s) to file to release | ||
# | ||
auth="Authorization: token ${GITHUB_TOKEN}" | ||
content="Content-Type:application/octet-stream" | ||
release="$(python -c "import json; print(json.load(open('${GITHUB_EVENT_PATH}', 'r'))['release']['id'])")" | ||
|
||
# Upload every file | ||
for file in "$@" | ||
do | ||
url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${release}/assets?name=$( basename "${file}" )" | ||
echo "Publishing: ${file} to ${url}" | ||
curl -sSL -XPOST -H "${auth}" --upload-file "${file}" --header "${content}" "${url}" || exit $? | ||
done | ||
exit 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
.* | ||
*.bak | ||
*~ | ||
*.egg-info | ||
__SHADOW__ | ||
__pycache__ | ||
dist/ | ||
fprim_fpp/fpp_version_info.py |
66 changes: 65 additions & 1 deletion
66
compiler/lib/src/main/resources/META-INF/native-image/jni-config.json
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,9 +1,73 @@ | ||
[ | ||
{ | ||
"name":"fpp.compiler.FPPFormat", | ||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | ||
}, | ||
{ | ||
"name":"fpp.compiler.FPPSyntax", | ||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | ||
}, | ||
{ | ||
"name":"fpp.compiler.tools.FPPCheck", | ||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | ||
}, | ||
{ | ||
"name":"fpp.compiler.tools.FPPDepend", | ||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | ||
}, | ||
{ | ||
"name":"fpp.compiler.tools.FPPFilenames", | ||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | ||
}, | ||
{ | ||
"name":"fpp.compiler.tools.FPPFromXml", | ||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | ||
}, | ||
{ | ||
"name":"fpp.compiler.tools.FPPLocateDefs", | ||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | ||
}, | ||
{ | ||
"name":"fpp.compiler.tools.FPPLocateUses", | ||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | ||
}, | ||
{ | ||
"name":"fpp.compiler.tools.FPPToCpp", | ||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | ||
}, | ||
{ | ||
"name":"fpp.compiler.tools.FPPToXml", | ||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | ||
}, | ||
{ | ||
"name":"java.lang.ClassLoader", | ||
"methods":[{"name":"getPlatformClassLoader","parameterTypes":[] }] | ||
"methods":[ | ||
{"name":"getPlatformClassLoader","parameterTypes":[] }, | ||
{"name":"loadClass","parameterTypes":["java.lang.String"] } | ||
] | ||
}, | ||
{ | ||
"name":"java.lang.NoSuchMethodError" | ||
}, | ||
{ | ||
"name":"java.lang.String", | ||
"methods":[ | ||
{"name":"lastIndexOf","parameterTypes":["int"] }, | ||
{"name":"substring","parameterTypes":["int"] } | ||
] | ||
}, | ||
{ | ||
"name":"java.lang.System", | ||
"methods":[ | ||
{"name":"getProperty","parameterTypes":["java.lang.String"] }, | ||
{"name":"setProperty","parameterTypes":["java.lang.String","java.lang.String"] } | ||
] | ||
}, | ||
{ | ||
"name":"jdk.internal.loader.ClassLoaders$PlatformClassLoader" | ||
}, | ||
{ | ||
"name":"org.graalvm.jniutils.JNIExceptionWrapperEntryPoints", | ||
"methods":[{"name":"getClassName","parameterTypes":["java.lang.Class"] }] | ||
} | ||
] |
8 changes: 8 additions & 0 deletions
8
compiler/lib/src/main/resources/META-INF/native-image/predefined-classes-config.json
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,8 @@ | ||
[ | ||
{ | ||
"type":"agent-extracted", | ||
"classes":[ | ||
] | ||
} | ||
] | ||
|
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
5 changes: 4 additions & 1 deletion
5
compiler/lib/src/main/resources/META-INF/native-image/resource-config.json
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,5 +1,8 @@ | ||
{ | ||
"resources":{ | ||
"includes":[]}, | ||
"bundles":[{"name":"com.sun.org.apache.xerces.internal.impl.msg.XMLMessages"}] | ||
"bundles":[{ | ||
"name":"com.sun.org.apache.xerces.internal.impl.msg.XMLMessages", | ||
"locales":["und"] | ||
}] | ||
} |
8 changes: 6 additions & 2 deletions
8
compiler/lib/src/main/resources/META-INF/native-image/serialization-config.json
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,2 +1,6 @@ | ||
[ | ||
] | ||
{ | ||
"types":[ | ||
], | ||
"lambdaCapturingTypes":[ | ||
] | ||
} |
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
Empty file.
Oops, something went wrong.