Bugfix ubuntu build (#107) #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
# pull_request: | |
# branches: | |
# - main | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
- 'v[0-9]+.[0-9]+.[0-9]+-\w+' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build_manylinux: | |
uses: ./.github/workflows/build-manylinux.yml | |
build_debian_stable: | |
uses: ./.github/workflows/build-debian-stable.yml | |
build_macos: | |
uses: ./.github/workflows/build-macos.yml | |
build_windows: | |
uses: ./.github/workflows/build-windows.yml | |
release: | |
needs: [build_manylinux, build_windows, build_debian_stable, build_macos] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set Release Tag | |
id: set_tag | |
run: | | |
if [[ "${{ github.event_name }}" == "pull_request" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
echo "RELEASE_TAG=${{ github.sha }}" >> $GITHUB_ENV | |
echo "TAG_DESCRIPTION=${{ github.sha }}" >> $GITHUB_ENV | |
else | |
echo "RELEASE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV | |
TAG_NAME=$(git describe --tags) | |
echo "TAG_DESCRIPTION=$(git tag -n99 $TAG_NAME | sed -n '2p')" >> $GITHUB_ENV | |
fi | |
- name: Download All Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: binaries* | |
path: Cell2Fire | |
merge-multiple: true | |
- name: Zip Binaries | |
run: | | |
cd Cell2Fire | |
ls | |
zip ../Cell2FireW_${{ env.RELEASE_TAG }}-Windows-x86_64-binary.zip Cell2Fire.exe *.dll | |
zip ../Cell2FireW_${{ env.RELEASE_TAG }}-manylinux-x86_64-binary.zip Cell2Fire ldd_manylinux.txt | |
zip ../Cell2FireW_${{ env.RELEASE_TAG }}-Debian.bookworm.x86_64-binary.zip Cell2Fire.Debian.bookworm.x86_64 ldd.Debian.bookworm.x86_64.txt | |
zip ../Cell2FireW_${{ env.RELEASE_TAG }}-Ubuntu.jammy.x86_64-binary.zip Cell2Fire.Ubuntu.jammy.x86_64 ldd.Ubuntu.jammy.x86_64.txt | |
zip ../Cell2FireW_${{ env.RELEASE_TAG }}-macOS-binaries.zip Cell2Fire_Darwin* otool*.txt | |
- name: Zip Data Instances | |
run: | | |
cd data | |
for format in asc tif; do | |
for fuel_model in CanadianFBP Kitral ScottAndBurgan; do | |
if find $fuel_model/*-$format -maxdepth 0 -quit 1>/dev/null 2>&1; then | |
echo "found $fuel_model $format" | |
zip -r ../$fuel_model-$format.zip $fuel_model/*-$format | |
fi | |
done | |
done | |
- name: Git Archive | |
run: | | |
git rm -r data output test | |
git rm -f *.pdf | |
git add -f Cell2Fire/* | |
astash=`git stash create` | |
git archive --prefix=C2F/ --output="Cell2FireW_${{ env.RELEASE_TAG }}.zip" $astash | |
- name: Create Draft Release | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: | | |
Cell2FireW_${{ env.RELEASE_TAG }}.zip | |
Cell2FireW_${{ env.RELEASE_TAG }}-Windows-x86_64-binary.zip | |
Cell2FireW_${{ env.RELEASE_TAG }}-manylinux-x86_64-binary.zip | |
Cell2FireW_${{ env.RELEASE_TAG }}-Debian.bookworm.x86_64-binary.zip | |
Cell2FireW_${{ env.RELEASE_TAG }}-Ubuntu.jammy.x86_64-binary.zip | |
Cell2FireW_${{ env.RELEASE_TAG }}-macOS-binaries.zip | |
Kitral-asc.zip | |
Kitral-tif.zip | |
CanadianFBP-asc.zip | |
ScottAndBurgan-asc.zip | |
ScottAndBurgan-tif.zip | |
token: ${{ secrets.GITHUB_TOKEN }} | |
draft: true | |
tag: ${{ env.RELEASE_TAG }} | |
name: "C2F-W: ${{ env.RELEASE_TAG }}" | |
body: ${{ env.TAG_DESCRIPTION}} |