|
99 | 99 | with: |
100 | 100 | name: sourcegit.linux-x64 |
101 | 101 | path: sourcegit.linux-x64.tar |
| 102 | + build-linux-arm64: |
| 103 | + name: Build Linux (arm64) |
| 104 | + runs-on: ubuntu-20.04 |
| 105 | + steps: |
| 106 | + - name: Checkout sources |
| 107 | + uses: actions/checkout@v4 |
| 108 | + with: |
| 109 | + fetch-depth: 0 |
| 110 | + - name: Setup .NET |
| 111 | + uses: actions/setup-dotnet@v4 |
| 112 | + with: |
| 113 | + dotnet-version: 8.0.x |
| 114 | + - name: Configure arm64 packages |
| 115 | + run: | |
| 116 | + sudo dpkg --add-architecture arm64 |
| 117 | + echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted |
| 118 | + deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted |
| 119 | + deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted' \ |
| 120 | + | sudo tee /etc/apt/sources.list.d/arm64.list |
| 121 | + sudo sed -i -e 's/^deb http/deb [arch=amd64] http/g' /etc/apt/sources.list |
| 122 | + sudo sed -i -e 's/^deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list |
| 123 | + - name: Install cross-compiling dependencies |
| 124 | + run: | |
| 125 | + sudo apt-get update |
| 126 | + sudo apt-get install clang llvm gcc-aarch64-linux-gnu zlib1g-dev:arm64 |
| 127 | + - name: Build |
| 128 | + run: dotnet build -c Release |
| 129 | + - name: Publish |
| 130 | + run: dotnet publish src/SourceGit.csproj -c Release -o publish -r linux-arm64 |
| 131 | + - name: Rename Executable File |
| 132 | + run: mv publish/SourceGit publish/sourcegit |
| 133 | + - name: Packing Program |
| 134 | + run: tar -cvf sourcegit.linux-arm64.tar -C publish/ . |
| 135 | + - name: Upload Artifact |
| 136 | + uses: actions/upload-artifact@v4 |
| 137 | + with: |
| 138 | + name: sourcegit.linux-arm64 |
| 139 | + path: sourcegit.linux-arm64.tar |
0 commit comments