diff --git a/.github/workflows/release-debian.yml b/.github/workflows/release-deb.yml similarity index 95% rename from .github/workflows/release-debian.yml rename to .github/workflows/release-deb.yml index 383818e2b..7572dc3a4 100644 --- a/.github/workflows/release-debian.yml +++ b/.github/workflows/release-deb.yml @@ -7,7 +7,7 @@ on: jobs: debian: - name: Debian release + name: DEB release runs-on: ubuntu-latest steps: @@ -24,7 +24,7 @@ jobs: - name: Configure run: | autoreconf -i - ./configure --enable-download --prefix="/usr/local" + ./configure --enable-optim --enable-generic --enable-download ./3rdparty/getall -a -o PETSc - name: PETSc @@ -96,4 +96,4 @@ jobs: with: files: ${{ steps.deb.outputs.file }} repo-token: ${{ secrets.GITHUB_TOKEN }} - release-tag: v${{ steps.deb.outputs.number }} + release-tag: v${{ steps.deb.outputs.version }}-testActions diff --git a/.github/workflows/release-exe.yml b/.github/workflows/release-exe.yml new file mode 100644 index 000000000..81a0531e4 --- /dev/null +++ b/.github/workflows/release-exe.yml @@ -0,0 +1,88 @@ +name: Windows Release +on: + workflow_run: + workflows: ['Release'] + types: + - completed + +jobs: + debian: + name: EXE release + runs-on: windows-latest + + steps: + - name: Install MS-MPI + shell: cmd + run: | + curl -L -O https://github.com/microsoft/Microsoft-MPI/releases/download/v10.1.1/msmpisetup.exe + .\msmpisetup.exe -unattend -force + + - uses: msys2/setup-msys2@v2 + with: + update: true + install: >- + mingw-w64-x86_64-toolchain + make + m4 + patch + git + flex + bison + unzip + mingw-w64-x86_64-openblas + mingw-w64-x86_64-hdf5 + mingw-w64-x86_64-gsl + autoconf + automake-wrapper + pkg-config + pkgfile + tar + mingw-w64-x86_64-cmake + mingw-w64-x86_64-msmpi + python + + - name: Remove packages + run: pacman -R --noconfirm mingw-w64-x86_64-python mingw-w64-x86_64-gdb mingw-w64-x86_64-gdb-multiarch + + - uses: actions/checkout@v4 + + - name: Configure + run: | + autoreconf -i + ./configure --enable-generic --enable-optim --enable-download --enable-maintainer-mode \ + MPICC=mpicc MPICXX=mpicxx MPIFC=mpif90 + ./3rdparty/getall -a -o PETSc + + - name: PETSc + run: | + cd 3rdparty/ff-petsc + make petsc-slepc + cd - + ./reconfigure + + - name: Build + run: make -j2 + + - name: Check + continue-on-error: true + run: make check + + - name: Create EXE + id: exe + run: | + VERSION=$(grep AC_INIT configure.ac | cut -d"," -f2 | cut -d"[" -f2 | cut -d"]" -f1) + echo "version=$VERSION" >> $GITHUB_OUTPUT + TMP_EXE_NAME=FreeFem++-${VERSION}-win64.exe + EXE_NAME=FreeFEM-${VERSION}-win64.exe + echo "file=$EXE_NAME" >> $GITHUB_OUTPUT + + cp AUTHORS readme/AUTHORS + make win32 + mv "$TMP_EXE_NAME" "$EXE_NAME" + + - name: Upload release + uses: AButler/upload-release-assets@v2.0.x + with: + files: ${{ steps.exe.outputs.file }} + repo-token: ${{ secrets.GITHUB_TOKEN }} + release-tag: v${{ steps.exe.outputs.version }}-testActions diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70163c6ce..39d9a41ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - feature-github-actions jobs: create: @@ -24,8 +25,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - name: FreeFEM v${{ steps.version.outputs.number }} - tag_name: v${{ steps.version.outputs.number }} + name: FreeFEM v${{ steps.version.outputs.number }}-testActions + tag_name: v${{ steps.version.outputs.number }}-testActions body: '**Warning**: this is an automatic release. If you encounter some trouble with packages, post a message in the [forum](https://community.freefem.org)' draft: false - prerelease: false + prerelease: true