|
7 | 7 | workflow_dispatch: |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - build: |
| 10 | + build-qemu: |
11 | 11 | name: Build sysroot for ${{ matrix.arch }} |
12 | 12 | runs-on: ubuntu-latest |
13 | 13 |
|
|
74 | 74 | file: artifacts/sysroot-${{ matrix.arch }}.tar.gz |
75 | 75 | tag: ${{ github.ref }} |
76 | 76 | overwrite: true |
| 77 | + |
| 78 | + build-raspbian: |
| 79 | + name: Build sysroot for Raspbian |
| 80 | + runs-on: ubuntu-latest |
| 81 | + |
| 82 | + steps: |
| 83 | + - uses: actions/checkout@v3 |
| 84 | + |
| 85 | + - name: Build |
| 86 | + run: | |
| 87 | + # The sysroot script doesn't like symlinks in the path. |
| 88 | + # We shouldn't need it here, but doesn't hurt either. |
| 89 | + third_party/rpi/sysroot.py \ |
| 90 | + --distro raspbian \ |
| 91 | + --sysroot $(realpath .) \ |
| 92 | + libc6-dev libstdc++-6-dev |
| 93 | +
|
| 94 | + - name: Compress |
| 95 | + run: | |
| 96 | + # shopt doesn't work for the bash script that is already running. |
| 97 | + # Run the command in a child bash instead. |
| 98 | + bash <<'EOF' |
| 99 | + shopt -s extglob |
| 100 | + tar c -zf sysroot-raspbian.tar.gz *(lib|include) usr/*(lib|include) |
| 101 | + EOF |
| 102 | +
|
| 103 | + - uses: actions/upload-artifact@v3 |
| 104 | + with: |
| 105 | + name: sysroot |
| 106 | + path: sysroot-raspbian.tar.gz |
| 107 | + |
| 108 | + - name: Upload release artifacts |
| 109 | + if: | |
| 110 | + github.event_name == 'release' && |
| 111 | + github.repository_owner == 'toitlang' |
| 112 | + uses: svenstaro/upload-release-action@v2 |
| 113 | + with: |
| 114 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 115 | + file: sysroot-raspbian.tar.gz |
| 116 | + tag: ${{ github.ref }} |
| 117 | + overwrite: true |
| 118 | + |
| 119 | + build-linaro: |
| 120 | + name: Build sysroot for Linaro |
| 121 | + runs-on: ubuntu-latest |
| 122 | + |
| 123 | + env: |
| 124 | + ARM_LINUX_GNUEABI_SYSROOT_URL: https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabi/sysroot-glibc-linaro-2.25-2019.12-arm-linux-gnueabi.tar.xz |
| 125 | + ARM_LINUX_GNUEABI_GCC_TOOLCHAIN_URL: https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabi/gcc-linaro-7.5.0-2019.12-i686_arm-linux-gnueabi.tar.xz |
| 126 | + |
| 127 | + steps: |
| 128 | + - name: Download |
| 129 | + run: | |
| 130 | + curl --location --output sysroot.tar.xz $ARM_LINUX_GNUEABI_SYSROOT_URL |
| 131 | + curl --location --output gcc.tar.xz $ARM_LINUX_GNUEABI_GCC_TOOLCHAIN_URL |
| 132 | +
|
| 133 | + - name: Extract |
| 134 | + run: | |
| 135 | + tar x --strip-components=1 -f sysroot.tar.xz |
| 136 | + tar x --strip-components=1 -f gcc.tar.xz |
| 137 | +
|
| 138 | + - name: Compress |
| 139 | + shell: bash |
| 140 | + run: | |
| 141 | + # shopt doesn't work for the bash script that is already running. |
| 142 | + # Run the command in a child bash instead. |
| 143 | + bash <<'EOF' |
| 144 | + shopt -s extglob |
| 145 | + tar c -zf sysroot-arm-linux-gnueabi.tar.gz \ |
| 146 | + *(lib|include) \ |
| 147 | + usr/*(lib|include) \ |
| 148 | + arm-linux-gnueabi/*(lib|include) \ |
| 149 | + arm-linux-gnueabi/libc/*(lib|include) \ |
| 150 | + arm-linux-gnueabi/libc/usr/*(lib|include) |
| 151 | + EOF |
| 152 | +
|
| 153 | + - uses: actions/upload-artifact@v3 |
| 154 | + with: |
| 155 | + name: sysroot |
| 156 | + path: sysroot-arm-linux-gnueabi.tar.gz |
| 157 | + |
| 158 | + - name: Upload release artifacts |
| 159 | + if: | |
| 160 | + github.event_name == 'release' && |
| 161 | + github.repository_owner == 'toitlang' |
| 162 | + uses: svenstaro/upload-release-action@v2 |
| 163 | + with: |
| 164 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 165 | + file: sysroot-arm-linux-gnueabi.tar.gz |
| 166 | + tag: ${{ github.ref }} |
| 167 | + overwrite: true |
0 commit comments