From 87878cebc92b4b51d7165a964179e088ef052098 Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 14:01:17 -0400 Subject: [PATCH 01/26] Added release-deb.yml --- .github/workflows/release-deb.yml | 133 ++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 .github/workflows/release-deb.yml diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml new file mode 100644 index 0000000..af754f0 --- /dev/null +++ b/.github/workflows/release-deb.yml @@ -0,0 +1,133 @@ +name: release-deb + +on: + push: + tags: + - 'v*.*.*' + branches: + - master + - main + paths-ignore: + - 'AUTHORS.md' + - 'LICENSE.md' + - 'README.md' + pull_request: + paths-ignore: + - 'AUTHORS.md' + - 'LICENSE.md' + - 'README.md' + +jobs: + build: + timeout-minutes: 60 + if: "!contains(github.event.head_commit.message, 'skip ci')" + name: ${{ matrix.os }} - ${{ matrix.fcompiler }} - ${{ matrix.build_type }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + # Linux + - os: ubuntu-latest + fcompiler: gfortran-12 + ccompiler: gcc-12 + shell: bash + build_type: debug + memcheck: false + - os: ubuntu-22.04 + fcompiler: gfortran-12 + ccompiler: gcc-12 + shell: bash + build_type: debug + memcheck: false + - os: ubuntu-20.04 + fcompiler: gfortran-12 + ccompiler: gcc-12 + shell: bash + build_type: debug + memcheck: false + defaults: + run: + shell: ${{ matrix.shell }} + steps: + # - uses: actions/checkout@v2 + # - name: create sample script + # run: | + # mkdir -p .debpkg/usr/bin + # mkdir -p .debpkg/usr/lib/samplescript + # echo -e "echo sample" > .debpkg/usr/bin/samplescript + # chmod +x .debpkg/usr/bin/samplescript + # echo -e "a=1" > .debpkg/usr/lib/samplescript/samplescript.conf + + # # create DEBIAN directory if you want to add other pre/post scripts + # mkdir -p .debpkg/DEBIAN + # echo -e "echo postinst" > .debpkg/DEBIAN/postinst + # chmod +x .debpkg/DEBIAN/postinst + # - uses: jiro4989/build-deb-action@v3 + # with: + # package: samplescript + # package_root: .debpkg + # maintainer: your_name + # version: ${{ github.ref }} # refs/tags/v*.*.* + # arch: 'amd64' + # depends: 'libc6 (>= 2.2.1), git' + # desc: 'this is sample package.' + # homepage: 'https://github.com/jiro4989/build-deb-action' + - name: Checkout repository + uses: actions/checkout@v3 + - name: Show version information + run: | + ${{ matrix.fcompiler }} --version + ${{ matrix.ccompiler }} --version + - name: Build with Cmake + run: | + mkdir build + cd build + FC=${{ matrix.fcompiler }} CC=${{ matrix.ccompiler }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ../ + make VERBOSE=1 + - name: Get version and architecture + run: | + echo "PACKAGE_VERSION=${GITHUB_REF#refs/tags/-v}" >> $GITHUB_ENV + echo "ARCH=${RUNNER_ARCH}" >> $GITHUB_ENV + - name: Build release directory + run: | + mkdir feq-parse_${{ env.PACKAGE_VERSION }}-1_${{ env.ARCH }} + cd feq-parse_${{ env.PACKAGE_VERSION }}-1_${{ env.ARCH }} + mkdir DEBIAN usr usr/local usr/local/include usr/local/lib + cp ../include/*.mod usr/local/include/*.mod + cp ../lib/*.so usr/local/lib/*.so + cp ../lib/*.a usr/local/lib/*.a + cat << EOF > DEBIAN/control + Package: feq-parse + Version: ${{ env.PACKAGE_VERSION }} + Section: libs + Priority: optional + Architecture: ${{ env.ARCH }} + Maintainer: Fluid Numerics LLC support@fluidnumerics.com + Description: An equation parser Fortran class that is used to interpret and evaluate functions provided as strings. + EOF + - name: Build .deb + run: | + dpkg --build . + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release v${{ env.PACKAGE_VERSION }} + draft: false + prerelease: false + + - name: Upload Release Asset (.deb) + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./feq-parse_${{ env.PACKAGE_VERSION }}-1_${{ env.ARCH }}.deb + asset_name: feq-parse_${{ env.PACKAGE_VERSION }}-1_${{ env.ARCH }}.deb + asset_content_type: application/vnd.debian.binary-package \ No newline at end of file From 969ec603874c7c86f4f2d928912e315a9d71f7e2 Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 14:04:06 -0400 Subject: [PATCH 02/26] Updated release-deb to run for branch 'release-actions' --- .github/workflows/release-deb.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index af754f0..c1d90bd 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -5,8 +5,9 @@ on: tags: - 'v*.*.*' branches: - - master - - main + # - master + # - main + - release-actions paths-ignore: - 'AUTHORS.md' - 'LICENSE.md' From dccbc4fd9264da10bb403d95ec971ac522c8ff56 Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 14:19:18 -0400 Subject: [PATCH 03/26] Changed to GCC toolchain 11 for ubuntu-20.04 --- .github/workflows/release-deb.yml | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index c1d90bd..9e73b67 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -42,8 +42,8 @@ jobs: build_type: debug memcheck: false - os: ubuntu-20.04 - fcompiler: gfortran-12 - ccompiler: gcc-12 + fcompiler: gfortran-11 + ccompiler: gcc-11 shell: bash build_type: debug memcheck: false @@ -51,31 +51,9 @@ jobs: run: shell: ${{ matrix.shell }} steps: - # - uses: actions/checkout@v2 - # - name: create sample script - # run: | - # mkdir -p .debpkg/usr/bin - # mkdir -p .debpkg/usr/lib/samplescript - # echo -e "echo sample" > .debpkg/usr/bin/samplescript - # chmod +x .debpkg/usr/bin/samplescript - # echo -e "a=1" > .debpkg/usr/lib/samplescript/samplescript.conf - - # # create DEBIAN directory if you want to add other pre/post scripts - # mkdir -p .debpkg/DEBIAN - # echo -e "echo postinst" > .debpkg/DEBIAN/postinst - # chmod +x .debpkg/DEBIAN/postinst - # - uses: jiro4989/build-deb-action@v3 - # with: - # package: samplescript - # package_root: .debpkg - # maintainer: your_name - # version: ${{ github.ref }} # refs/tags/v*.*.* - # arch: 'amd64' - # depends: 'libc6 (>= 2.2.1), git' - # desc: 'this is sample package.' - # homepage: 'https://github.com/jiro4989/build-deb-action' - name: Checkout repository uses: actions/checkout@v3 + - name: Show version information run: | ${{ matrix.fcompiler }} --version From 426a104e68b63f6b8455e01e1c7d3c58a66d1e41 Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 14:23:40 -0400 Subject: [PATCH 04/26] Changed PACKAGE_VERSION to RELEASE_VERSION --- .github/workflows/release-deb.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 9e73b67..8ce6fac 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -66,19 +66,19 @@ jobs: make VERBOSE=1 - name: Get version and architecture run: | - echo "PACKAGE_VERSION=${GITHUB_REF#refs/tags/-v}" >> $GITHUB_ENV + echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV echo "ARCH=${RUNNER_ARCH}" >> $GITHUB_ENV - name: Build release directory run: | - mkdir feq-parse_${{ env.PACKAGE_VERSION }}-1_${{ env.ARCH }} - cd feq-parse_${{ env.PACKAGE_VERSION }}-1_${{ env.ARCH }} + mkdir feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} + cd feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} mkdir DEBIAN usr usr/local usr/local/include usr/local/lib cp ../include/*.mod usr/local/include/*.mod cp ../lib/*.so usr/local/lib/*.so cp ../lib/*.a usr/local/lib/*.a cat << EOF > DEBIAN/control Package: feq-parse - Version: ${{ env.PACKAGE_VERSION }} + Version: ${{ env.RELEASE_VERSION }} Section: libs Priority: optional Architecture: ${{ env.ARCH }} @@ -96,7 +96,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} - release_name: Release v${{ env.PACKAGE_VERSION }} + release_name: Release v${{ env.RELEASE_VERSION }} draft: false prerelease: false @@ -107,6 +107,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./feq-parse_${{ env.PACKAGE_VERSION }}-1_${{ env.ARCH }}.deb - asset_name: feq-parse_${{ env.PACKAGE_VERSION }}-1_${{ env.ARCH }}.deb + asset_path: ./feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb + asset_name: feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb asset_content_type: application/vnd.debian.binary-package \ No newline at end of file From 1ad02d25fc6f8b53449696ca913680cc4a241bc9 Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 14:29:54 -0400 Subject: [PATCH 05/26] Changed directory changes --- .github/workflows/release-deb.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 8ce6fac..e90a296 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -70,6 +70,7 @@ jobs: echo "ARCH=${RUNNER_ARCH}" >> $GITHUB_ENV - name: Build release directory run: | + cd build mkdir feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} cd feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} mkdir DEBIAN usr usr/local usr/local/include usr/local/lib @@ -87,7 +88,7 @@ jobs: EOF - name: Build .deb run: | - dpkg --build . + dpkg --build feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} - name: Create Release id: create_release From 3a720e9865265e543c23f567e34c58258d78db90 Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 14:34:33 -0400 Subject: [PATCH 06/26] Added `pwd` for testing --- .github/workflows/release-deb.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index e90a296..38c66e7 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -60,16 +60,18 @@ jobs: ${{ matrix.ccompiler }} --version - name: Build with Cmake run: | - mkdir build - cd build - FC=${{ matrix.fcompiler }} CC=${{ matrix.ccompiler }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ../ - make VERBOSE=1 + pwd + mkdir build + cd build + FC=${{ matrix.fcompiler }} CC=${{ matrix.ccompiler }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ../ + make VERBOSE=1 - name: Get version and architecture run: | echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV echo "ARCH=${RUNNER_ARCH}" >> $GITHUB_ENV - name: Build release directory run: | + pwd cd build mkdir feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} cd feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} From c51b0841c2d0772fb0ddce7cc5b898898282e217 Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 14:35:06 -0400 Subject: [PATCH 07/26] Changed to GCC toolchain 10 for ubuntu-20.04 --- .github/workflows/release-deb.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 38c66e7..1482324 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -42,8 +42,8 @@ jobs: build_type: debug memcheck: false - os: ubuntu-20.04 - fcompiler: gfortran-11 - ccompiler: gcc-11 + fcompiler: gfortran-10 + ccompiler: gcc-10 shell: bash build_type: debug memcheck: false From e25ccb9bb37d5dced5bae003fd14f7be9180c80a Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 14:38:44 -0400 Subject: [PATCH 08/26] Fixed error in copy commands --- .github/workflows/release-deb.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 1482324..5416ab3 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -76,9 +76,9 @@ jobs: mkdir feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} cd feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} mkdir DEBIAN usr usr/local usr/local/include usr/local/lib - cp ../include/*.mod usr/local/include/*.mod - cp ../lib/*.so usr/local/lib/*.so - cp ../lib/*.a usr/local/lib/*.a + cp ../include/*.mod usr/local/include/ + cp ../lib/*.so usr/local/lib/ + cp ../lib/*.a usr/local/lib/ cat << EOF > DEBIAN/control Package: feq-parse Version: ${{ env.RELEASE_VERSION }} From 1dfd68998726b5c993bae686b3fe27d41c5e256f Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 14:40:47 -0400 Subject: [PATCH 09/26] Changed `lib` to `src` in copy command --- .github/workflows/release-deb.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 5416ab3..95beb5b 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -77,8 +77,8 @@ jobs: cd feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} mkdir DEBIAN usr usr/local usr/local/include usr/local/lib cp ../include/*.mod usr/local/include/ - cp ../lib/*.so usr/local/lib/ - cp ../lib/*.a usr/local/lib/ + cp ../src/*.so usr/local/lib/ + cp ../src/*.a usr/local/lib/ cat << EOF > DEBIAN/control Package: feq-parse Version: ${{ env.RELEASE_VERSION }} From deeb6027b43ba5e3c379b1c5f2f45078c3da32ab Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 14:44:23 -0400 Subject: [PATCH 10/26] Added `cd build` to appropriate lines --- .github/workflows/release-deb.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 95beb5b..bfbd718 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -60,7 +60,6 @@ jobs: ${{ matrix.ccompiler }} --version - name: Build with Cmake run: | - pwd mkdir build cd build FC=${{ matrix.fcompiler }} CC=${{ matrix.ccompiler }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ../ @@ -71,7 +70,6 @@ jobs: echo "ARCH=${RUNNER_ARCH}" >> $GITHUB_ENV - name: Build release directory run: | - pwd cd build mkdir feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} cd feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} @@ -90,6 +88,7 @@ jobs: EOF - name: Build .deb run: | + cd build dpkg --build feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} - name: Create Release @@ -110,6 +109,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb + asset_path: ./build/feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb asset_name: feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb asset_content_type: application/vnd.debian.binary-package \ No newline at end of file From 1018afffafa33babb8140c16b570f3d968a1588d Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 14:53:25 -0400 Subject: [PATCH 11/26] Small changes to `Get version and architecture` --- .github/workflows/release-deb.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index bfbd718..7b4e3f6 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -66,8 +66,10 @@ jobs: make VERBOSE=1 - name: Get version and architecture run: | - echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - echo "ARCH=${RUNNER_ARCH}" >> $GITHUB_ENV + echo "RELEASE_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV + echo ${{ env.RELEASE_VERSION }} + echo "ARCH=amd64" >> $GITHUB_ENV + # change above line if not building for amd64 - name: Build release directory run: | cd build From 8824095b11dc3a58d494de67e506c6669fb46f86 Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 14:56:12 -0400 Subject: [PATCH 12/26] Attempt to grab release tag --- .github/workflows/release-deb.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 7b4e3f6..93794ce 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -66,8 +66,7 @@ jobs: make VERBOSE=1 - name: Get version and architecture run: | - echo "RELEASE_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV - echo ${{ env.RELEASE_VERSION }} + echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV echo "ARCH=amd64" >> $GITHUB_ENV # change above line if not building for amd64 - name: Build release directory From 38ac781cc07687be15b91cd32bf3e154c90199c3 Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 15:10:57 -0400 Subject: [PATCH 13/26] Fixed grabbing tag name --- .github/workflows/release-deb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 93794ce..e568d34 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -66,7 +66,7 @@ jobs: make VERBOSE=1 - name: Get version and architecture run: | - echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV + echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV echo "ARCH=amd64" >> $GITHUB_ENV # change above line if not building for amd64 - name: Build release directory From 6f8fb99d78c19d69d915115e1910b73ebd4f3848 Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 15:25:12 -0400 Subject: [PATCH 14/26] Added TAG string --- .github/workflows/release-deb.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index e568d34..1c76d11 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -66,7 +66,8 @@ jobs: make VERBOSE=1 - name: Get version and architecture run: | - echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + TAG=${GITHUB_REF#refs/*/} + echo "RELEASE_VERSION=${TAG:1}" >> $GITHUB_ENV echo "ARCH=amd64" >> $GITHUB_ENV # change above line if not building for amd64 - name: Build release directory From b46a3de4a58e680aa38a27ed44e40cd60ebc64a9 Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 16:13:56 -0400 Subject: [PATCH 15/26] Build only with ubuntu-20.04 and gfortran/gcc-10 --- .github/workflows/release-deb.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 1c76d11..d2750a5 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -3,11 +3,11 @@ name: release-deb on: push: tags: - - 'v*.*.*' - branches: + - 'v*.*' + # branches: # - master # - main - - release-actions + # - release-actions paths-ignore: - 'AUTHORS.md' - 'LICENSE.md' @@ -28,19 +28,6 @@ jobs: fail-fast: false matrix: include: - # Linux - - os: ubuntu-latest - fcompiler: gfortran-12 - ccompiler: gcc-12 - shell: bash - build_type: debug - memcheck: false - - os: ubuntu-22.04 - fcompiler: gfortran-12 - ccompiler: gcc-12 - shell: bash - build_type: debug - memcheck: false - os: ubuntu-20.04 fcompiler: gfortran-10 ccompiler: gcc-10 From 3d8e5f6b967e557bfa29ac9726472704f975f916 Mon Sep 17 00:00:00 2001 From: garrett Date: Thu, 27 Jun 2024 16:39:02 -0400 Subject: [PATCH 16/26] Added `Run ctests` in release-deb.yml --- .github/workflows/release-deb.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index d2750a5..cef5da2 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -100,4 +100,9 @@ jobs: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./build/feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb asset_name: feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb - asset_content_type: application/vnd.debian.binary-package \ No newline at end of file + asset_content_type: application/vnd.debian.binary-package + + - name: Run ctests + run: | + cd build/test + ctest || ctest --rerun-failed --output-on-failure \ No newline at end of file From f23223b67d8c5fce45163193ab2c4df733bec8be Mon Sep 17 00:00:00 2001 From: garrett Date: Fri, 28 Jun 2024 13:56:06 -0400 Subject: [PATCH 17/26] Minor changes to release-deb.yml --- .github/workflows/release-deb.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index cef5da2..3335497 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -3,7 +3,7 @@ name: release-deb on: push: tags: - - 'v*.*' + - 'v*.*.*' # branches: # - master # - main @@ -91,7 +91,7 @@ jobs: draft: false prerelease: false - - name: Upload Release Asset (.deb) + - name: Upload Release (.deb) id: upload-release-asset uses: actions/upload-release-asset@v1 env: From b9f851356aa59e5b460be55f22f7e4970de7d4f2 Mon Sep 17 00:00:00 2001 From: garrett Date: Fri, 28 Jun 2024 13:56:25 -0400 Subject: [PATCH 18/26] Updated README --- README.md | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index eb226fb..05f2985 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Copyright 2020 Fluid Numerics LLC [**API Documentation**](https://feqparse.fluidnumerics.com/ford) ## Installation -`feq-parse` can be installed using either CMake, [Fortran Package Manager (fpm)](https://github.com/fortran-lang/fpm), or with [Spack](https://spack.io). +`feq-parse` can be installed using either CMake, [Fortran Package Manager (fpm)](https://github.com/fortran-lang/fpm), [Spack](https://spack.io), or with [`apt-get`](https://wiki.debian.org/apt-get) on Debian-based distributions. ### Prerequisites All you need is a Fortran compiler that is compliant with the Fortran 2008 standard and supports C interoperability. You can see which compilers are regularly tested on the [Github actions page](https://github.com/FluidNumerics/feq-parse/actions/workflows/ci.yml). Additionally, the table below lists the [supported compilers](#supported-compilers) @@ -52,9 +52,12 @@ ctest . The above steps install ``` -/opt/feqparse/lib/libfeqparse-static.a -/opt/feqparse/lib/libfeqparse.so -/opt/feqparse/include/FEQParse.mod +/usr/local/lib/libfeqparse-static.a +/usr/local/lib/libfeqparse.so +/usr/local/include/feqparse_floatstacks.mod +/usr/local/include/feqparse_functions.mod +/usr/local/include/feqparse_tokenstack.mod +/usr/local/include/feqparse.mod ``` ### Fortran Package Manager @@ -101,17 +104,31 @@ spack install feq-parse To install a specific version of feq-parse with spack, e.g. ``` -spack install feq-parse@1.1.0 +spack install feq-parse@2.2.1 ``` Refer to the [spack documentation](https://spack.readthedocs.io/en/latest/) for further guidance on using Spack. +### `apt-get` +A `.deb` file is provided for each minor release. If you are using a Debian-based linux distribution (e.g., Debian, Ubuntu, Pop_OS!) and an `x86_64/amd64` architecture, simply download the `.deb` via the github interface, or with +``` +wget https://github.com/FluidNumerics/feq-parse/releases/download//feq-parse_-1_amd64.deb +``` +and then run +``` +sudo apt-get install feq-parse_-1_amd64.deb +``` +in the directory in which it was downloaded. + +All `.deb` releases are built using **Ubuntu 20.04.06 LTS** with **GNU Fortran 10**. + ## Supported Compilers The following combinations are tested on the main branch of feq-parse: Name | Version | Platform | Build System | Architecture --- | --- | --- | --- | --- | +GNU Fortran | 10 | Ubuntu 20.04.6 LTS | `cmake` | x86_64 GNU Fortran | 9, 10, 11, 12 | Ubuntu 22.04.2 LTS | `fpm`, `cmake` | x86_64 GNU Fortran | 13.2.0 | Windows Server 2022 (10.0.20348 Build 1547) (MSYS2) | `fpm`, `cmake` | x86_64 Intel oneAPI (`ifx`)| 2023.2 | Ubuntu 22.04.2 LTS | `fpm`, `cmake` | x86_64 From 0aba14bb696148f6532f8c784673f27e06347862 Mon Sep 17 00:00:00 2001 From: garrett Date: Fri, 28 Jun 2024 15:02:29 -0400 Subject: [PATCH 19/26] Fixed typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 05f2985..5f6bfa2 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ wget https://github.com/FluidNumerics/feq-parse/releases/download/-1_amd64.deb +sudo apt-get install ./feq-parse_-1_amd64.deb ``` in the directory in which it was downloaded. From 12f86718ec59f3b625fa9a4f2eb057db3486d80c Mon Sep 17 00:00:00 2001 From: garrett Date: Fri, 28 Jun 2024 15:25:12 -0400 Subject: [PATCH 20/26] Added Test Install step --- .github/workflows/release-deb.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 3335497..960809c 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -102,7 +102,14 @@ jobs: asset_name: feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb asset_content_type: application/vnd.debian.binary-package - - name: Run ctests + - name: Test Install run: | - cd build/test - ctest || ctest --rerun-failed --output-on-failure \ No newline at end of file + cd build + sudo apt-get install ./feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb + cd ../test + mkdir ../output + for file in *.f90; do gfortran "$file" -I /usr/local/include -L /usr/local/lib -l feqparse -o "../output/${file%.f90}"; done + export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH + cd ../output + for file in *; do ./*; done + \ No newline at end of file From c4a57248bd49e08ed16e37343db882dd278a0b24 Mon Sep 17 00:00:00 2001 From: garrett Date: Mon, 1 Jul 2024 13:21:43 -0400 Subject: [PATCH 21/26] Removed unecessary conditions in `on` block --- .github/workflows/release-deb.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 960809c..4cdb3a4 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -1,22 +1,9 @@ name: release-deb on: - push: - tags: - - 'v*.*.*' - # branches: - # - master - # - main - # - release-actions - paths-ignore: - - 'AUTHORS.md' - - 'LICENSE.md' - - 'README.md' - pull_request: - paths-ignore: - - 'AUTHORS.md' - - 'LICENSE.md' - - 'README.md' + push: + tags: + - 'v*.*.*' jobs: build: From c73681019cd052ad82910a969bfb8505bdba04fb Mon Sep 17 00:00:00 2001 From: garrett Date: Mon, 1 Jul 2024 13:23:22 -0400 Subject: [PATCH 22/26] Cleaned up matrix --- .github/workflows/release-deb.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 4cdb3a4..a37342f 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -16,11 +16,11 @@ jobs: matrix: include: - os: ubuntu-20.04 + arch: amd64 fcompiler: gfortran-10 ccompiler: gcc-10 shell: bash - build_type: debug - memcheck: false + build_type: release defaults: run: shell: ${{ matrix.shell }} From a1bb54b6da7618fc8939f5fe5d4bb0dcf34b41f5 Mon Sep 17 00:00:00 2001 From: garrett Date: Mon, 1 Jul 2024 13:27:01 -0400 Subject: [PATCH 23/26] Fixed versioning/arch specification throughout --- .github/workflows/release-deb.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index a37342f..62c8b8d 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -38,34 +38,28 @@ jobs: cd build FC=${{ matrix.fcompiler }} CC=${{ matrix.ccompiler }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ../ make VERBOSE=1 - - name: Get version and architecture - run: | - TAG=${GITHUB_REF#refs/*/} - echo "RELEASE_VERSION=${TAG:1}" >> $GITHUB_ENV - echo "ARCH=amd64" >> $GITHUB_ENV - # change above line if not building for amd64 - name: Build release directory run: | cd build - mkdir feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} - cd feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} + mkdir feq-parse_${{ github.ref_name }}_${{ matrix.arch }} + cd feq-parse_${{ github.ref_name }}_${{ matrix.arch }} mkdir DEBIAN usr usr/local usr/local/include usr/local/lib cp ../include/*.mod usr/local/include/ cp ../src/*.so usr/local/lib/ cp ../src/*.a usr/local/lib/ cat << EOF > DEBIAN/control Package: feq-parse - Version: ${{ env.RELEASE_VERSION }} + Version: ${{ github.ref_name }} Section: libs Priority: optional - Architecture: ${{ env.ARCH }} + Architecture: ${{ matrix.arch }} Maintainer: Fluid Numerics LLC support@fluidnumerics.com Description: An equation parser Fortran class that is used to interpret and evaluate functions provided as strings. EOF - name: Build .deb run: | cd build - dpkg --build feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }} + dpkg --build feq-parse_${{ github.ref_name }}_${{ matrix.arch }} - name: Create Release id: create_release @@ -74,7 +68,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} - release_name: Release v${{ env.RELEASE_VERSION }} + release_name: Release v${{ github.ref_name }} draft: false prerelease: false @@ -85,14 +79,14 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./build/feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb - asset_name: feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb + asset_path: ./build/feq-parse_${{ github.ref_name }}_${{ matrix.arch }}.deb + asset_name: feq-parse_${{ github.ref_name }}_${{ matrix.arch }}.deb asset_content_type: application/vnd.debian.binary-package - name: Test Install run: | cd build - sudo apt-get install ./feq-parse_${{ env.RELEASE_VERSION }}-1_${{ env.ARCH }}.deb + sudo apt-get install ./feq-parse_${{ github.ref_name }}_${{ github.ref_name }}.deb cd ../test mkdir ../output for file in *.f90; do gfortran "$file" -I /usr/local/include -L /usr/local/lib -l feqparse -o "../output/${file%.f90}"; done From 4ad5e33ee81293265e7f45b024aab1d028535f09 Mon Sep 17 00:00:00 2001 From: garrett Date: Mon, 1 Jul 2024 13:59:33 -0400 Subject: [PATCH 24/26] Updated README and versioning schema --- .github/workflows/release-deb.yml | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index 62c8b8d..d6d5c53 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -3,7 +3,7 @@ name: release-deb on: push: tags: - - 'v*.*.*' + - '*.*.*' jobs: build: diff --git a/README.md b/README.md index 5f6bfa2..842b0dd 100644 --- a/README.md +++ b/README.md @@ -104,13 +104,13 @@ spack install feq-parse To install a specific version of feq-parse with spack, e.g. ``` -spack install feq-parse@2.2.1 +spack install feq-parse@2.2.2 ``` Refer to the [spack documentation](https://spack.readthedocs.io/en/latest/) for further guidance on using Spack. ### `apt-get` -A `.deb` file is provided for each minor release. If you are using a Debian-based linux distribution (e.g., Debian, Ubuntu, Pop_OS!) and an `x86_64/amd64` architecture, simply download the `.deb` via the github interface, or with +A `.deb` file is provided for each release. If you are using a Debian-based linux distribution (e.g., Debian, Ubuntu, Pop_OS!) and an `x86_64/amd64` architecture, simply download the `.deb` via the [github interface](), or with ``` wget https://github.com/FluidNumerics/feq-parse/releases/download//feq-parse_-1_amd64.deb ``` From 0a5b45a0ee3e7ded66452fd91757c7cd876567ed Mon Sep 17 00:00:00 2001 From: garrett Date: Mon, 1 Jul 2024 14:03:35 -0400 Subject: [PATCH 25/26] Fixed typo --- .github/workflows/release-deb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-deb.yml b/.github/workflows/release-deb.yml index d6d5c53..cbd9a85 100644 --- a/.github/workflows/release-deb.yml +++ b/.github/workflows/release-deb.yml @@ -86,7 +86,7 @@ jobs: - name: Test Install run: | cd build - sudo apt-get install ./feq-parse_${{ github.ref_name }}_${{ github.ref_name }}.deb + sudo apt-get install ./feq-parse_${{ github.ref_name }}_${{ matrix.arch }}.deb cd ../test mkdir ../output for file in *.f90; do gfortran "$file" -I /usr/local/include -L /usr/local/lib -l feqparse -o "../output/${file%.f90}"; done From 7f0a237995ebec85bdc2768674a58d0e6d7ea263 Mon Sep 17 00:00:00 2001 From: garrett Date: Mon, 1 Jul 2024 14:15:07 -0400 Subject: [PATCH 26/26] Updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 842b0dd..a5e5c65 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ Refer to the [spack documentation](https://spack.readthedocs.io/en/latest/) for ### `apt-get` A `.deb` file is provided for each release. If you are using a Debian-based linux distribution (e.g., Debian, Ubuntu, Pop_OS!) and an `x86_64/amd64` architecture, simply download the `.deb` via the [github interface](), or with ``` -wget https://github.com/FluidNumerics/feq-parse/releases/download//feq-parse_-1_amd64.deb +wget https://github.com/FluidNumerics/feq-parse/releases/download//feq-parse__amd64.deb -P /tmp ``` and then run ```