|
| 1 | +name: "build envmap example (end-to-end)" |
| 2 | + |
| 3 | +jobs: |
| 4 | + build-cosmocc: |
| 5 | + name: "build cosmocc and static lib deps" |
| 6 | + runs-on: ubuntu-24.04 |
| 7 | + steps: |
| 8 | + - name: "clone repo" |
| 9 | + uses: actions/checkout@v4 |
| 10 | + - name: "setup qemu and requirements" |
| 11 | + run: bash scripts/setup-requirements.sh |
| 12 | + - name: "get boot/mx labs jdk" |
| 13 | + run: ARCH=x86_64 make get-boot-jdk get-mx-labs-jdk |
| 14 | + - name: "build cosmocc" |
| 15 | + run: make build-deps-labs collect-cosmocc |
| 16 | + - name: "build labs JDK static libs (aarch64)" |
| 17 | + run: | |
| 18 | + rm -f results/build-graal-helpers.complete |
| 19 | + rm -f results/collect-graal-helpers.complete |
| 20 | + rm -f results/build-labs-jdk.complete |
| 21 | + rm -f results/collect-labs-jdk.complete |
| 22 | + ARCH=aarch64 make collect-labs-jdk collect-graal-helpers |
| 23 | + - name: "build labs JDK static libs (x86_64)" |
| 24 | + run: | |
| 25 | + rm -f results/build-graal-helpers.complete |
| 26 | + rm -f results/collect-graal-helpers.complete |
| 27 | + rm -f results/build-labs-jdk.complete |
| 28 | + rm -f results/collect-labs-jdk.complete |
| 29 | + ARCH=x86_64 make collect-labs-jdk collect-graal-helpers |
| 30 | + - name: "upload cosmocc" |
| 31 | + uses: actions/upload-artifact@v6 |
| 32 | + with: |
| 33 | + name: cosmocc |
| 34 | + overwrite: true |
| 35 | + path: ./build/cosmocc.zip |
| 36 | + compression-level: 0 |
| 37 | + - name: "upload labs JDK x86_64 libs" |
| 38 | + uses: actions/upload-artifact@v6 |
| 39 | + with: |
| 40 | + name: labs-x86_64-libs |
| 41 | + overwrite: true |
| 42 | + path: ./build/labs-x86_64-cosmo-libs.zip |
| 43 | + compression-level: 0 |
| 44 | + - name: "upload graal helper x86_64 libs" |
| 45 | + uses: actions/upload-artifact@v6 |
| 46 | + with: |
| 47 | + name: graal-x86_64-libs |
| 48 | + overwrite: true |
| 49 | + path: ./build/graal-x86_64-helpers.zip |
| 50 | + compression-level: 0 |
| 51 | + - name: "upload labs JDK aarch64 libs" |
| 52 | + uses: actions/upload-artifact@v6 |
| 53 | + with: |
| 54 | + name: labs-aarch64-libs |
| 55 | + overwrite: true |
| 56 | + path: ./build/labs-aarch64-cosmo-libs.zip |
| 57 | + compression-level: 0 |
| 58 | + - name: "upload graal helper aarch64 libs" |
| 59 | + uses: actions/upload-artifact@v6 |
| 60 | + with: |
| 61 | + name: graal-aarch64-libs |
| 62 | + overwrite: true |
| 63 | + path: ./build/graal-aarch64-helpers.zip |
| 64 | + compression-level: 0 |
| 65 | + build-via-native-image: |
| 66 | + name: "build envmap via native-image" |
| 67 | + needs: [build-cosmocc] |
| 68 | + strategy: |
| 69 | + fail-fast: true |
| 70 | + matrix: |
| 71 | + include: |
| 72 | + - platform: ubuntu-24.04 |
| 73 | + arch: 'x86_64' |
| 74 | + - platform: ubuntu-24.04-arm |
| 75 | + arch: 'aarch64' |
| 76 | + runs-on: ${{ matrix.platform }} |
| 77 | + steps: |
| 78 | + - name: "clone repo" |
| 79 | + uses: actions/checkout@v4 |
| 80 | + - name: "setup qemu and requirements" |
| 81 | + run: bash scripts/setup-requirements.sh |
| 82 | + - name: "download cosmocc" |
| 83 | + uses: actions/download-artifact@v7 |
| 84 | + with: |
| 85 | + name: cosmocc |
| 86 | + - name: "download labs JDK libs" |
| 87 | + uses: actions/download-artifact@v7 |
| 88 | + with: |
| 89 | + name: labs-${{ matrix.arch }}-libs |
| 90 | + - name: "download graal helper libs" |
| 91 | + uses: actions/download-artifact@v7 |
| 92 | + with: |
| 93 | + name: graal-${{ matrix.arch }}-libs |
| 94 | + - name: "build native image from source" |
| 95 | + run: make ARCH=${{ matrix.arch }} build-native-image |
| 96 | + - name: "setup downloaded artifacts" |
| 97 | + run: ARCH=${{ matrix.arch }} bash scripts/download-partials-setup.sh |
| 98 | + - name: "build envmap example" |
| 99 | + run: make ARCH=${{ matrix.arch }} build-envmap-example |
| 100 | + - name: "upload envmap example" |
| 101 | + uses: actions/upload-artifact@v6 |
| 102 | + with: |
| 103 | + name: envmap-${{ matrix.arch }} |
| 104 | + overwrite: true |
| 105 | + path: ./build/envmap.${{ matrix.arch }} |
| 106 | + compression-level: 0 |
| 107 | + build-ape: |
| 108 | + name: "build envmap APE" |
| 109 | + needs: [build-via-native-image] |
| 110 | + runs-on: ubuntu-24.04 |
| 111 | + steps: |
| 112 | + - name: "clone repo" |
| 113 | + uses: actions/checkout@v4 |
| 114 | + - name: "setup qemu and requirements" |
| 115 | + run: bash scripts/setup-requirements.sh |
| 116 | + - name: "get cosmocc artifact" |
| 117 | + uses: actions/download-artifact@v7 |
| 118 | + with: |
| 119 | + name: cosmocc |
| 120 | + - name: "get x86_64 envmap artifact" |
| 121 | + uses: actions/download-artifact@v7 |
| 122 | + with: |
| 123 | + name: envmap-x86_64 |
| 124 | + - name: "get aarch64 envmap artifact" |
| 125 | + uses: actions/download-artifact@v7 |
| 126 | + with: |
| 127 | + name: envmap-aarch64 |
| 128 | + - name: "setup cosmocc" |
| 129 | + run: | |
| 130 | + mkdir -p testing/cosmopolitan |
| 131 | + cd testing/cosmopolitan |
| 132 | + unzip -qo ../../cosmocc.zip |
| 133 | + cd ../../ |
| 134 | + - name: "build APE" |
| 135 | + run: bash scripts/apelinkpls.sh envmap |
| 136 | + - name: "upload envmap APE" |
| 137 | + uses: actions/upload-artifact@v6 |
| 138 | + with: |
| 139 | + name: envmap-APE |
| 140 | + overwrite: true |
| 141 | + path: ./envmap.com |
| 142 | + compression-level: 0 |
0 commit comments