|
| 1 | +name: Swift ARM |
| 2 | +on: [push] |
| 3 | +jobs: |
| 4 | + |
| 5 | + linux-arm-raspios-build: |
| 6 | + name: Linux (Raspios) |
| 7 | + runs-on: ubuntu-latest |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + arch: ["armv6", "armv7"] |
| 11 | + swift: ["6.1.2"] |
| 12 | + config: ["debug" , "release"] |
| 13 | + linux: ["raspios"] |
| 14 | + release: ["bookworm"] |
| 15 | + container: swift:${{ matrix.swift }} |
| 16 | + steps: |
| 17 | + - name: Checkout |
| 18 | + uses: actions/checkout@v4 |
| 19 | + - name: Install dependencies |
| 20 | + run: apt update -y; apt install wget -y |
| 21 | + - name: Install SDK |
| 22 | + run: | |
| 23 | + wget https://github.com/xtremekforever/swift-armv7/releases/download/${{ matrix.swift }}/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz |
| 24 | + tar -xvf swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz |
| 25 | + mv swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} |
| 26 | + - name: Swift Version |
| 27 | + run: swift --version |
| 28 | + - name: Build |
| 29 | + run: SWIFT_BUILD_DYNAMIC_LIBRARY=1 swift build -c ${{ matrix.config }} --destination /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}/${{ matrix.linux }}-${{ matrix.release }}.json |
| 30 | + |
| 31 | + linux-arm-debian-build: |
| 32 | + name: Linux (Debian) |
| 33 | + runs-on: ubuntu-latest |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + arch: ["armv7"] |
| 37 | + swift: ["6.1.2"] |
| 38 | + config: ["debug" , "release"] |
| 39 | + linux: ["debian"] |
| 40 | + release: ["bookworm", "bullseye"] |
| 41 | + container: swift:${{ matrix.swift }} |
| 42 | + steps: |
| 43 | + - name: Checkout |
| 44 | + uses: actions/checkout@v4 |
| 45 | + - name: Install dependencies |
| 46 | + run: apt update -y; apt install wget -y |
| 47 | + - name: Install SDK |
| 48 | + run: | |
| 49 | + wget https://github.com/xtremekforever/swift-armv7/releases/download/${{ matrix.swift }}/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz |
| 50 | + tar -xvf swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz |
| 51 | + mv swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} |
| 52 | + - name: Swift Version |
| 53 | + run: swift --version |
| 54 | + - name: Build |
| 55 | + run: SWIFT_BUILD_DYNAMIC_LIBRARY=1 swift build -c ${{ matrix.config }} --destination /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}/${{ matrix.linux }}-${{ matrix.release }}.json |
| 56 | + - name: Upload artifacts |
| 57 | + uses: actions/upload-artifact@v4 |
| 58 | + with: |
| 59 | + name: "swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-coremodel-${{ matrix.config }}" |
| 60 | + path: .build/armv7-unknown-linux-gnueabihf/${{ matrix.config }}/libGATT.so |
0 commit comments