3232 required : false
3333 default : trace/META-INF/native-image
3434 type : string
35- meta-package :
36- description : " Meta-package name to publish"
37- required : false
38- default : " "
39- type : string
4035 extra-tools :
4136 description : " Extra meta-package tools publish"
4237 required : false
4338 default : " "
4439 type : string
45- fast-hack :
46- description : " Publish fast (deprecated) packages"
47- required : false
48- default : false
49- type : boolean
5040jobs :
5141 build-jars :
5242 runs-on : " ubuntu-22.04"
5747 with :
5848 submodules : recursive
5949 - name : " Setup Native Image Tools"
60- uses : fprime-community/ native-images-action@main
50+ uses : ./.github/actions/ native-tools-setup
6151 - name : " Building JAR files"
6252 run : |
6353 cd ${{ inputs.working-directory }}
6757 uses : actions/upload-artifact@v4
6858 with :
6959 name : build-jar
70- path : ${{ inputs.output-directory }}/*
60+ path : ${{ inputs.output-directory }}/fpp.jar
7161 retention-days : 5
7262 if-no-files-found : error
7363 - if : ${{ inputs.trace }}
@@ -102,8 +92,12 @@ jobs:
10292 matrix = {
10393 "run": [
10494 {
105- "runner": "macos-13",
106- "tag": "macosx_13_0_universal2"
95+ "runner": "macos-14",
96+ "tag": "macosx_14_0_arm64"
97+ },
98+ {
99+ "runner": "macos-15-intel",
100+ "tag": "macosx_15_0_x86_64"
107101 },
108102 {
109103 "runner": "ubuntu-22.04",
@@ -135,8 +129,6 @@ jobs:
135129 uses : actions/checkout@v3
136130 with :
137131 submodules : recursive
138- - name : " Setup Native Image Tools"
139- uses : fprime-community/native-images-action@main
140132 - name : " Download JARs"
141133 uses : actions/download-artifact@v4
142134 with :
@@ -148,21 +140,32 @@ jobs:
148140 with :
149141 name : jar-traces
150142 path : ${{ inputs.trace-directory }}
143+ - name : " Setting up GraalVM/Java Environment"
144+ uses : ./.github/actions/native-tools-setup
151145 - name : " Build Native Images"
152- run : |
153- export CLASSPATH="`cd ${{ inputs.trace-directory }}/../..; pwd`:${CLASSPATH}"
154- cd ${{ inputs.working-directory }}
155- $NATIVE_IMAGE_TOOLS_PATH/native-images ${{ inputs.output-directory }} ${{ inputs.tools }}
156- shell : bash
146+ uses : ./.github/actions/build-native-images
147+ with :
148+ binary-directory : ${{ inputs.output-directory }}
149+ trace-directory : ${{ inputs.trace-directory }}
157150 - name : " Archive Native Images"
158151 uses : actions/upload-artifact@v4
159152 with :
160153 name : build-${{ matrix.run.tag }}
161- path : ${{ inputs.output-directory }}/*
154+ path : ${{ inputs.output-directory }}/fpp
162155 retention-days : 5
163156 if-no-files-found : error
164157 - name : " Testing Native Images via Unit-Tests"
165158 run : |
159+ # Generate wrappers for tools
160+ tool_names=`cat ${{ inputs.working-directory }}/compiler/tools.txt`
161+ for tool in $tool_names
162+ do
163+ tool_wrapper="${{ inputs.output-directory }}/fpp-$tool"
164+ echo "Generating wrapper for fpp-$tool in $tool_wrapper"
165+ echo '#!/bin/sh
166+ "`dirname $0`/fpp" '$tool' "$@"' > $tool_wrapper
167+ chmod +x $tool_wrapper
168+ done
166169 cd ${{ inputs.working-directory }}
167170 ${{ inputs.test }}
168171 build-wheels :
@@ -175,27 +178,27 @@ jobs:
175178 uses : actions/checkout@v3
176179 with :
177180 submodules : recursive
181+ - name : " Make Output Directory"
182+ run : mkdir -p ${{ inputs.output-directory }}
178183 - name : " Download Package"
179184 uses : actions/download-artifact@v4
180185 with :
181186 name : build-${{ matrix.tag }}
182187 path : ${{ inputs.output-directory }}
183- - name : " Install Builder"
184- run : pip install fprime-native-images
185- shell : bash
186188 - name : " Run Builder"
187189 run : |
188- FLAGS="--package-tag ${{ matrix.tag }} --extra-tools ${{ inputs.extra-tools }}"
189- if [[ "${{ matrix.tag }}" == "jar" ]] && [[ "${{ inputs.meta-package }}" != "" ]]
190- then
191- echo "[INFO] Generating Meta-Package: ${{ inputs.meta-package }}"
192- FLAGS="${FLAGS} --meta-package ${{ inputs.meta-package }}"
193- elif [[ "${{ inputs.fast-hack }}" == "true" ]]
194- then
195- echo "[INFO] Generating fast-hack packages"
196- FLAGS="${FLAGS} --fast-hack"
190+ pip install build
191+ # Place the native files in the python package and determine platform options
192+ PLATFORM_OPTIONS=""
193+ if [[ "${{ matrix.tag }}" != "jar" ]]; then
194+ PLATFORM_OPTIONS="--config-setting=--build-option=--plat-name=${{ matrix.tag }}"
195+ cp -vr ${{ inputs.output-directory }}/fpp python/fprime_fpp/
196+ else
197+ cp -vr ${{ inputs.output-directory }}/*.jar python/fprime_fpp/
197198 fi
198- fprime-native-packager ${{ inputs.output-directory }} ${FLAGS}
199+ # Github archiving clears executable flag, so put it back
200+ chmod +x python/fprime_fpp/fpp*
201+ python3 -m build --wheel --outdir packages/dist $PLATFORM_OPTIONS .
199202 shell : bash
200203 - name : " Archiving Wheels"
201204 uses : actions/upload-artifact@v4
@@ -211,7 +214,7 @@ jobs:
211214 runs-on : ${{ matrix.run.runner }}
212215 steps :
213216 - name : " Setup Native Image Tools"
214- uses : fprime-community/native-images-action@main
217+ uses : fprime-community/native-images-action@unified-tool
215218 - name : " Download Native Wheels"
216219 uses : actions/download-artifact@v4
217220 with :
0 commit comments