|
| 1 | +name: Swift ARM |
| 2 | +on: [push] |
| 3 | +jobs: |
| 4 | + |
| 5 | + linux-arm-raspios-build: |
| 6 | + name: Linux (Build) |
| 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 (Test) |
| 33 | + runs-on: ubuntu-latest |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + arch: ["armv7"] |
| 37 | + swift: ["6.1.2"] |
| 38 | + linux: ["debian"] |
| 39 | + release: ["bookworm", "bullseye"] |
| 40 | + container: swift:${{ matrix.swift }} |
| 41 | + steps: |
| 42 | + - name: Checkout |
| 43 | + uses: actions/checkout@v4 |
| 44 | + - name: Install dependencies |
| 45 | + run: apt update -y; apt install wget -y |
| 46 | + - name: Install SDK |
| 47 | + run: | |
| 48 | + wget https://github.com/xtremekforever/swift-armv7/releases/download/${{ matrix.swift }}/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz |
| 49 | + tar -xvf swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz |
| 50 | + mv swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} |
| 51 | + - name: Swift Version |
| 52 | + run: swift --version |
| 53 | + - name: Build |
| 54 | + 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 |
| 55 | + - name: Upload artifacts |
| 56 | + uses: actions/upload-artifact@v4 |
| 57 | + with: |
| 58 | + name: "swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-coremodel-${{ matrix.config }}" |
| 59 | + path: .build/armv7-unknown-linux-gnueabihf/${{ matrix.config }}/libCoreModel.so |
| 60 | + |
| 61 | + linux-arm-debian-test: |
| 62 | + name: Linux (Test) |
| 63 | + runs-on: ubuntu-latest |
| 64 | + strategy: |
| 65 | + matrix: |
| 66 | + config: ["debug"] |
| 67 | + swift: ["6.1.2"] |
| 68 | + linux: ["debian"] |
| 69 | + release: ["bookworm", "bullseye"] |
| 70 | + arch: ["armv7"] |
| 71 | + container: swift:${{ matrix.swift }} |
| 72 | + steps: |
| 73 | + - name: Checkout |
| 74 | + uses: actions/checkout@v4 |
| 75 | + - name: Install dependencies |
| 76 | + run: apt update -y; apt install wget -y |
| 77 | + - name: Install SDK |
| 78 | + run: | |
| 79 | + wget https://github.com/xtremekforever/swift-armv7/releases/download/${{ matrix.swift }}/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz |
| 80 | + tar -xvf swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz |
| 81 | + mv swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} |
| 82 | + - name: Swift Version |
| 83 | + run: swift --version |
| 84 | + - name: Build |
| 85 | + run: SWIFT_BUILD_DYNAMIC_LIBRARY=0 swift build --build-tests -c ${{ matrix.config }} --destination /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}/${{ matrix.linux }}-${{ matrix.release }}.json |
| 86 | + - name: Upload artifacts |
| 87 | + uses: actions/upload-artifact@v4 |
| 88 | + with: |
| 89 | + name: "swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-coremodel-${{ matrix.config }}-test" |
| 90 | + path: .build/armv7-unknown-linux-gnueabihf/${{ matrix.config }}/CoreModelPackageTests.xctest |
0 commit comments