diff --git a/.github/actions/build-harvester.sh b/.github/actions/build-harvester.sh index 4f95d09f..2460a279 100644 --- a/.github/actions/build-harvester.sh +++ b/.github/actions/build-harvester.sh @@ -47,8 +47,14 @@ pushd build-harvester cmake .. -DCMAKE_BUILD_TYPE=Release -DBB_HARVESTER_ONLY=ON cmake --build . --config Release --target bladebit_harvester -cmake --install . --prefix harvester_dist +if [[ "$host_os" == "windows" ]]; then + OBJDUMP=$("${CUDA_PATH}"\\bin\\cuobjdump Release\\bladebit_harvester.dll) +elif [[ "$host_os" == "linux" ]]; then + OBJDUMP=$(/usr/local/cuda/bin/cuobjdump libbladebit_harvester.so) +fi + +cmake --install . --prefix harvester_dist pushd harvester_dist/green_reaper if [[ "$host_os" == "windows" ]]; then @@ -78,6 +84,22 @@ ls -la cat "${artifact_name}.sha256.txt" if [[ "$CI" == "true" ]]; then + if [[ "$host_os" == "windows" ]] || [[ "$host_os" == "linux" ]]; then + while IFS= read -r line; do + echo -e "$(echo ${line#* } | tr -d '*')\n###### ${line%% *}\n" + done <"${artifact_name}.sha256.txt" >> "$GITHUB_STEP_SUMMARY" + echo "| Arch | Code Version | Host | Compile Size |" >> "$GITHUB_STEP_SUMMARY" + echo "| --- | --- | --- | --- |" >> "$GITHUB_STEP_SUMMARY" + echo "$OBJDUMP" | awk -v RS= -v FS='\n' -v OFS=' | ' '{ + for (i=1; i<=NF; i++) { + if (index($i, "=")) { + gsub(/.* = /, "", $i); + } + } + print $3, $4, $5, $6; + }' | sed 's/^/| /; s/$/ |/; s/ | | / | /g' >> "$GITHUB_STEP_SUMMARY" + fi + if [[ "$host_os" == "windows" ]]; then harvester_artifact_path="$(cygpath -m "$(pwd)/${artifact_name}")*" else diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 27806127..0cfc70cc 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -16,6 +16,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set Env + uses: Chia-Network/actions/setjobenv@main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get Version Number id: version_number shell: bash @@ -49,6 +54,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set Env + uses: Chia-Network/actions/setjobenv@main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get Version Number id: version_number shell: bash @@ -82,6 +92,8 @@ jobs: echo "harvester_artifact_name=${artifact_name}" >> "$GITHUB_ENV" # emits env.harvester_artifact_path bash .github/actions/build-harvester.sh --artifact "${artifact_name}" + env: + CUDA_PATH: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }} - name: Upload Harvester Artifact uses: actions/upload-artifact@v3 @@ -98,6 +110,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set Env + uses: Chia-Network/actions/setjobenv@main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Cache DNF packages uses: actions/cache@v3 with: @@ -153,6 +170,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set Env + uses: Chia-Network/actions/setjobenv@main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get Version Number id: version_number run: bash -e .github/actions/get-version.sh macos arm64 @@ -181,6 +203,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set Env + uses: Chia-Network/actions/setjobenv@main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get Version Number id: version_number run: bash -e .github/actions/get-version.sh macos x86-64 @@ -207,6 +234,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set Env + uses: Chia-Network/actions/setjobenv@main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get Version Number id: version_number run: .github/actions/get-version.sh ubuntu x86-64 @@ -252,6 +284,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set Env + uses: Chia-Network/actions/setjobenv@main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get Version Number id: version_number run: .github/actions/get-version.sh centos x86-64 @@ -261,7 +298,6 @@ jobs: set -eo pipefail dnf install -y gcc-toolset-9-gcc gcc-toolset-9-gcc-c++ \ gmp-devel numactl-devel make git wget subscription-manager - bash .github/actions/install-cmake-linux.sh - name: Build Bladebit @@ -299,7 +335,7 @@ jobs: name: ${{ env.BB_ARTIFACT_NAME_CUDA }} path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME_CUDA }} if-no-files-found: error - + build-bladebit-centos-arm64: runs-on: [ARM64, Linux] container: @@ -308,6 +344,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set Env + uses: Chia-Network/actions/setjobenv@main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get Version Number id: version_number run: .github/actions/get-version.sh centos arm64 @@ -315,7 +356,7 @@ jobs: - name: Install Prerequisites run: | dnf install -y gcc-toolset-9-gcc gcc-toolset-9-gcc-c++ \ - cmake gmp-devel numactl-devel make git + cmake gmp-devel numactl-devel make git - name: Build run: | @@ -340,6 +381,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set Env + uses: Chia-Network/actions/setjobenv@main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get Version Number id: version_number run: .github/actions/get-version.sh ubuntu arm64 @@ -385,6 +431,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set Env + uses: Chia-Network/actions/setjobenv@main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get Version Number shell: bash id: version_number @@ -429,6 +480,11 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set Env + uses: Chia-Network/actions/setjobenv@main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get Version Number shell: bash id: version_number