|
| 1 | +name: Build on push |
| 2 | + |
| 3 | +on: push |
| 4 | + |
| 5 | +jobs: |
| 6 | + compile: |
| 7 | + name: Compile the stubs |
| 8 | + runs-on: macos-11 |
| 9 | + steps: |
| 10 | + - uses: actions/checkout@v2 |
| 11 | + |
| 12 | + - name: Install shc via HomeBrew |
| 13 | + run: | |
| 14 | + brew install shc |
| 15 | + shc -h |
| 16 | +
|
| 17 | + - name: Compile universalJavaApplicationStub |
| 18 | + run: | |
| 19 | + echo "Running shc..." |
| 20 | + shc -r -f src/universalJavaApplicationStub |
| 21 | +
|
| 22 | + - name: Build universalJavaApplicationStub x86_64 |
| 23 | + run: | |
| 24 | + echo "Running clang for universalJavaApplicationStub.x86_64" |
| 25 | + clang -o universalJavaApplicationStub.x86_64 -target x86_64-apple-macos10.10 src/universalJavaApplicationStub.x.c |
| 26 | + strip universalJavaApplicationStub.x86_64 |
| 27 | +
|
| 28 | + - name: Build universalJavaApplicationStub arm64 |
| 29 | + run: | |
| 30 | + echo "Running clang for universalJavaApplicationStub.arm64" |
| 31 | + clang -o universalJavaApplicationStub.arm64 -target arm64-apple-macos11 src/universalJavaApplicationStub.x.c |
| 32 | + strip universalJavaApplicationStub.arm64 |
| 33 | +
|
| 34 | + - name: Build universal universalJavaApplicationStub |
| 35 | + run: | |
| 36 | + echo "Runnning lipo" |
| 37 | + lipo -create -output universalJavaApplicationStub universalJavaApplicationStub.x86_64 universalJavaApplicationStub.arm64 |
| 38 | + strip universalJavaApplicationStub |
| 39 | + chmod ug=rwx,o=rx universalJavaApplicationStub |
| 40 | +
|
| 41 | + - name: Build nativeJavaApplicationStub |
| 42 | + run: | |
| 43 | + make universal |
| 44 | +
|
| 45 | + - name: Archive production artifacts |
| 46 | + uses: actions/upload-artifact@v3 |
| 47 | + with: |
| 48 | + name: universalJavaApplicationStub |
| 49 | + retention-days: 7 |
| 50 | + path: | |
| 51 | + ./src/universalJavaApplicationStub |
| 52 | + ./universalJavaApplicationStub.x86_64 |
| 53 | + ./universalJavaApplicationStub.arm64 |
| 54 | + ./universalJavaApplicationStub |
| 55 | +
|
| 56 | + - name: Archive production artifacts |
| 57 | + uses: actions/upload-artifact@v3 |
| 58 | + with: |
| 59 | + name: nativeJavaApplicationStub |
| 60 | + retention-days: 7 |
| 61 | + path: | |
| 62 | + ./build/x86_64/nativeJavaApplicationStub |
| 63 | + ./build/arm64/nativeJavaApplicationStub |
| 64 | + ./build/universal/nativeJavaApplicationStub |
0 commit comments