├── README.md └── .github └── workflows └── build.yml /README.md: -------------------------------------------------------------------------------- 1 | # ZSF .NET SDK Builds 2 | 3 | This repository builds the .NET SDK for various architectures. It is based on 4 | [filipnavara/dotnet-riscv](https://github.com/filipnavara/dotnet-riscv). These 5 | builds are only intended for use with 6 | [ziglang/runner](https://github.com/ziglang/runner). 7 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | on: 2 | workflow_dispatch: 3 | inputs: 4 | tfm: 5 | description: Target framework moniker 6 | required: true 7 | type: choice 8 | options: 9 | - net10.0 10 | - net9.0 11 | arch: 12 | description: Target architecture 13 | required: true 14 | type: choice 15 | options: 16 | - arm 17 | - arm64 18 | - loongarch64 19 | - ppc64le 20 | - riscv64 21 | - s390x 22 | - x64 23 | os: 24 | description: Target operating system 25 | required: true 26 | type: choice 27 | options: 28 | - freebsd 29 | - linux 30 | runtime: 31 | description: Runtime flavor 32 | required: true 33 | type: choice 34 | options: 35 | - coreclr 36 | - mono 37 | ref: 38 | description: Git branch or tag 39 | required: true 40 | type: string 41 | permissions: 42 | contents: read 43 | env: 44 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 45 | jobs: 46 | build: 47 | runs-on: ubuntu-latest 48 | steps: 49 | - name: Clean 50 | uses: AdityaGarg8/remove-unwanted-software@v5 51 | with: 52 | remove-android: true 53 | remove-cached-tools: true 54 | remove-codeql: true 55 | remove-docker-images: true 56 | remove-dotnet: true 57 | remove-haskell: true 58 | remove-large-packages: true 59 | remove-swapfile: true 60 | - name: Clone 61 | run: | 62 | git clone --branch ${{ inputs.ref }} --depth 1 --single-branch https://github.com/dotnet/dotnet 63 | - name: Build 64 | run: | 65 | docker run \ 66 | --rm \ 67 | --platform linux/amd64 \ 68 | --volume ${{ github.workspace }}/dotnet:/dotnet \ 69 | --workdir /dotnet \ 70 | --env ROOTFS_DIR=/crossrootfs/${{ inputs.arch }} \ 71 | mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-${{ inputs.tfm }}-cross-${{ inputs.os == 'freebsd' && 'freebsd-14-' || '' }}${{ inputs.arch == 'x64' && 'amd64' || inputs.arch }} \ 72 | ./build.sh \ 73 | --clean-while-building \ 74 | --prep \ 75 | --source-only \ 76 | --arch ${{ inputs.arch }} \ 77 | --os ${{ inputs.os }} \ 78 | ${{ inputs.runtime == 'mono' && '--use-mono-runtime' || '' }} \ 79 | -property:CrossBuild=true \ 80 | -property:OfficialBuildId=$(date +%Y%m%d).99 81 | - name: Upload 82 | uses: actions/upload-artifact@v4 83 | with: 84 | name: dotnet-sdk-${{ inputs.os }}-${{ inputs.arch }} 85 | path: ${{ github.workspace }}/dotnet/artifacts/assets/Release/Sdk/*/dotnet-sdk-*-${{ inputs.os }}-${{ inputs.arch }}.tar.gz 86 | --------------------------------------------------------------------------------