Add cirdl support to the release workflow
Signed-off-by: Slava <20563034+veaceslavdoina@users.noreply.github.com>
This commit is contained in:
parent
5e3244c0d9
commit
80e3e40f8b
|
@ -10,7 +10,8 @@ env:
|
||||||
cache_nonce: 0 # Allows for easily busting actions/cache caches
|
cache_nonce: 0 # Allows for easily busting actions/cache caches
|
||||||
nim_version: pinned
|
nim_version: pinned
|
||||||
rust_version: 1.78.0
|
rust_version: 1.78.0
|
||||||
binary_base: codex
|
codex_binary_base: codex
|
||||||
|
cirdl_binary_base: cirdl
|
||||||
build_dir: build
|
build_dir: build
|
||||||
nim_flags: '-d:verify_circuit=true'
|
nim_flags: '-d:verify_circuit=true'
|
||||||
windows_libs: 'libstdc++-6.dll libgomp-1.dll libgcc_s_seh-1.dll libwinpthread-1.dll'
|
windows_libs: 'libstdc++-6.dll libgomp-1.dll libgcc_s_seh-1.dll libwinpthread-1.dll'
|
||||||
|
@ -70,13 +71,19 @@ jobs:
|
||||||
macos*) os_name="darwin" ;;
|
macos*) os_name="darwin" ;;
|
||||||
windows*) os_name="windows" ;;
|
windows*) os_name="windows" ;;
|
||||||
esac
|
esac
|
||||||
binary="${{ env.binary_base }}-${{ github.ref_name }}-${os_name}-${{ matrix.cpu }}"
|
codex_binary="${{ env.codex_binary_base }}-${{ github.ref_name }}-${os_name}-${{ matrix.cpu }}"
|
||||||
[[ ${os_name} == "windows" ]] && binary="${binary}.exe"
|
cirdl_binary="${{ env.cirdl_binary_base }}-${{ github.ref_name }}-${os_name}-${{ matrix.cpu }}"
|
||||||
echo "binary=${binary}" >>$GITHUB_ENV
|
if [[ ${os_name} == "windows" ]]; then
|
||||||
|
codex_binary="${codex_binary}.exe"
|
||||||
|
cirdl_binary="${cirdl_binary}.exe"
|
||||||
|
fi
|
||||||
|
echo "codex_binary=${codex_binary}" >>$GITHUB_ENV
|
||||||
|
echo "cirdl_binary=${cirdl_binary}" >>$GITHUB_ENV
|
||||||
|
|
||||||
- name: Release - Build
|
- name: Release - Build
|
||||||
run: |
|
run: |
|
||||||
make NIMFLAGS="--out:${{ env.build_dir }}/${{ env.binary }} ${{ env.nim_flags }}"
|
make NIMFLAGS="--out:${{ env.build_dir }}/${{ env.codex_binary }} ${{ env.nim_flags }}"
|
||||||
|
make cirdl NIMFLAGS="--out:${{ env.build_dir }}/${{ env.cirdl_binary }} ${{ env.nim_flags }}"
|
||||||
|
|
||||||
- name: Release - Libraries
|
- name: Release - Libraries
|
||||||
run: |
|
run: |
|
||||||
|
@ -86,11 +93,26 @@ jobs:
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Release - Upload build artifacts
|
- name: Release - Upload codex build artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: release-${{ env.binary }}
|
name: release-${{ env.codex_binary }}
|
||||||
path: ${{ env.build_dir }}/
|
path: ${{ env.build_dir }}/${{ env.codex_binary_base }}*
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
- name: Release - Upload cirdl build artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-${{ env.cirdl_binary }}
|
||||||
|
path: ${{ env.build_dir }}/${{ env.cirdl_binary_base }}*
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
- name: Release - Upload windows libs
|
||||||
|
if: matrix.os == 'windows'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-${{ matrix.os }}-libs
|
||||||
|
path: ${{ env.build_dir }}/*.dll
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
# Release
|
# Release
|
||||||
|
@ -115,32 +137,30 @@ jobs:
|
||||||
}
|
}
|
||||||
|
|
||||||
# Compress and prepare
|
# Compress and prepare
|
||||||
for file in *; do
|
for file in ${{ env.codex_binary_base }}* ${{ env.cirdl_binary_base }}*; do
|
||||||
# Exclude libraries
|
if [[ "${file}" == *".exe"* ]]; then
|
||||||
if [[ "${file}" != *".dll"* ]]; then
|
|
||||||
if [[ "${file}" == *".exe"* ]]; then
|
|
||||||
|
|
||||||
# Windows - binary only
|
# Windows - binary only
|
||||||
arc="${file%.*}.zip"
|
arc="${file%.*}.zip"
|
||||||
zip "${arc}" "${file}"
|
zip "${arc}" "${file}"
|
||||||
checksum "${arc}"
|
checksum "${arc}"
|
||||||
|
|
||||||
# Windows - binary and libs
|
# Windows - binary and libs
|
||||||
arc="${file%.*}-libs.zip"
|
arc="${file%.*}-libs.zip"
|
||||||
zip "${arc}" "${file}" ${{ env.windows_libs }}
|
zip "${arc}" "${file}" ${{ env.windows_libs }}
|
||||||
rm -f "${file}" ${{ env.windows_libs }}
|
rm -f "${file}"
|
||||||
checksum "${arc}"
|
checksum "${arc}"
|
||||||
else
|
else
|
||||||
|
|
||||||
# Linux/macOS
|
# Linux/macOS
|
||||||
arc="${file}.tar.gz"
|
arc="${file}.tar.gz"
|
||||||
chmod 755 "${file}"
|
chmod 755 "${file}"
|
||||||
tar cfz "${arc}" "${file}"
|
tar cfz "${arc}" "${file}"
|
||||||
rm -f "${file}"
|
rm -f "${file}"
|
||||||
checksum "${arc}"
|
checksum "${arc}"
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
rm -f ${{ env.windows_libs }}
|
||||||
|
|
||||||
- name: Release - Upload compressed artifacts and checksums
|
- name: Release - Upload compressed artifacts and checksums
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
Loading…
Reference in New Issue