From db42d3c348d8175f0b11841dfd6d101e50311a10 Mon Sep 17 00:00:00 2001 From: Simon Garnotel Date: Thu, 15 Feb 2024 10:52:37 +0100 Subject: [PATCH] re-test all --- .github/workflows/release-deb.yml | 12 ++- .github/workflows/release-dmg-arm.yml | 102 ++++++++++++++++++++++++++ .github/workflows/release-dmg.yml | 12 ++- .github/workflows/release-exe.yml | 12 ++- 4 files changed, 117 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/release-dmg-arm.yml diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index cdde7a0eb..fc905fced 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -1,11 +1,9 @@ name: Release Debian -on: ['push'] -# workflow_run: -# workflows: ['Release'] -# types: -# - completed - -# TODO remove ['push'] and uncomment workflow_run +on: + workflow_run: + workflows: ['Release'] + types: + - completed jobs: debian: diff --git a/.github/workflows/release-dmg-arm.yml b/.github/workflows/release-dmg-arm.yml new file mode 100644 index 000000000..6cc576055 --- /dev/null +++ b/.github/workflows/release-dmg-arm.yml @@ -0,0 +1,102 @@ +name: Release MacOS ARM +on: + workflow_run: + workflows: ['Release'] + types: + - completed + +# TODO remove ['push'] and uncomment workflow_run + +jobs: + macos: + name: DMG release ARM + runs-on: self-hosted + + env: + CC: gcc + CXX: g++ + FC: gfortran + F77: gfortran + ARCH: ARM + + steps: + - uses: actions/checkout@main + + - name: Install + run: brew install gcc m4 git flex bison suitesparse hdf5 cmake wget autoconf automake freeglut + + - name: Symlink GCC & Fortran + run: ./etc/actions/macos/link_fortran.sh + + - name: Version + id: version + run: | + VERSION=$(grep AC_INIT configure.ac | cut -d"," -f2 | cut -d"[" -f2 | cut -d"]" -f1) + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "prefix=/Applications/FreeFem++.app/Contents/ff-$VERSION" >> $GITHUB_OUTPUT + echo "dmg_dir=FreeFEM-$VERSION-$ARCH" >> $GITHUB_OUTPUT + + - name: Create paths + run: | + PREFIX=${{ steps.version.outputs.prefix }} + + sudo mkdir -p "$PREFIX" + + - name: Fortran copy + run: | + PREFIX=${{ steps.version.outputs.prefix }} + + sudo ./etc/actions/release/macos/copy_fortran.sh "$PREFIX" + + - name: Configure + run: | + PREFIX=${{ steps.version.outputs.prefix }} + autoreconf -i + ./configure --enable-optim --enable-generic --enable-download --enable-m64 \ + --prefix="$PREFIX" \ + "CXXFLAGS=-Wno-undefined-var-template" \ + "FLIBS=-L"$PREFIX/gnu" -lgfortran -lquadmath" + ./3rdparty/getall -a -o PETSc + + - name: PETSc + run: | + cd 3rdparty/ff-petsc + make petsc-slepc SUDO=sudo + cd - + ./reconfigure + + - name: Build + run: make -j2 + + - name: Check + continue-on-error: true + run: make check + + - name: Install + run: | + PREFIX=${{ steps.version.outputs.prefix }} + mkdir -p "$HOME/pkg/$PREFIX" + rsync -a "$PREFIX/." "$HOME/pkg/$PREFIX/." + sudo make install DESTDIR="$HOME/pkg" + + - name: Fix gfotran lib + run: | + PREFIX=${{ steps.version.outputs.prefix }} + + sudo ./etc/actions/release/macos/fix_fortran.sh "$HOME/pkg" "$PREFIX" + + - name: Create DMG + id: dmg + run: | + DMG_DIR=${{ steps.version.outputs.dmg_dir }} + + sudo ./etc/actions/release/macos/create_dmg.sh "$HOME/pkg" "$DMG_DIR" + + echo "file=$DMG_DIR.dmg" >>$GITHUB_OUTPUT + + - name: Upload release + uses: AButler/upload-release-assets@v2.0.x + with: + files: ${{ steps.dmg.outputs.file }} + repo-token: ${{ secrets.GITHUB_TOKEN }} + release-tag: v${{ steps.version.outputs.version }}-testActions diff --git a/.github/workflows/release-dmg.yml b/.github/workflows/release-dmg.yml index 81a2ae88d..77daf7248 100644 --- a/.github/workflows/release-dmg.yml +++ b/.github/workflows/release-dmg.yml @@ -1,11 +1,9 @@ name: Release MacOS -on: ['push'] -# workflow_run: -# workflows: ['Release'] -# types: -# - completed - -# TODO remove ['push'] and uncomment workflow_run +on: + workflow_run: + workflows: ['Release'] + types: + - completed jobs: macos: diff --git a/.github/workflows/release-exe.yml b/.github/workflows/release-exe.yml index f5e13738c..3a991f47f 100644 --- a/.github/workflows/release-exe.yml +++ b/.github/workflows/release-exe.yml @@ -1,11 +1,9 @@ name: Release Windows -on: ['push'] -# workflow_run: -# workflows: ['Release'] -# types: -# - completed - -# TODO remove ['push'] and uncomment workflow_run +on: + workflow_run: + workflows: ['Release'] + types: + - completed jobs: windows: