Skip to content

linux-riscv64 dotnet-runtime build #35

linux-riscv64 dotnet-runtime build

linux-riscv64 dotnet-runtime build #35

name: linux-riscv64 dotnet-runtime build
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Remove unnecessary files
run: df -h; sudo rm -rf "$AGENT_TOOLSDIRECTORY"; df -h
- name: runtime+libs+packs build
run: |
git clone https://github.com/am11/runtime --single-branch --depth 1 -b feature/nativeaot/riscv64-port
docker run --rm -v$(pwd)/runtime:/runtime -e ROOTFS_DIR=/crossrootfs/riscv64 \
mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-riscv64-net9.0 \
sh -c '/runtime/build.sh -cross -arch riscv64 -c Checked -s clr+libs &&
/runtime/build.sh -cross -arch riscv64 -c Release -s libs &&
rm -rf /runtime/artifacts/obj &&
export BuildAllTestsAsStandalone=true &&
/runtime/src/tests/build.sh -riscv64 -Checked -priority1 -cross -p:UseLocalAppHostPack=true &&
rm -rf ../runtime/artifacts/obj'
- name: Upload artifacts
run: |
sudo apt install -y hub
# hub(1) requires release to be created inside a git repo
git clone https://${{ secrets.CLONE_TOKEN }}:[email protected]/${{ github.repository }}.git repo
cd repo
tar czf artifacts.tar.gz ../runtime/artifacts
du -sh artifacts.tar.gz
du -b artifacts.tar.gz
# Split the tar.gz file into 1.5 GB chunks
split -b 1536M artifacts.tar.gz artifacts_part_
# Initialize the artifacts variable
artifacts=""
# Loop over the split files and append each one to the artifacts variable
for chunk in artifacts_part_*
do
artifacts+=" -a ${chunk}"
done
tag_name="linux-riscv64_$GITHUB_RUN_ID"
hub release create $artifacts -m "$tag_name" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}