From b41ea8e08f8525b6bcb93fc6cf68482f7dd3edc0 Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Thu, 6 Jun 2024 22:48:19 +0200 Subject: [PATCH 01/15] run all tests with user-specified runner --- src/fpm.f90 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/fpm.f90 b/src/fpm.f90 index b162ff2827..b6156e3bf3 100644 --- a/src/fpm.f90 +++ b/src/fpm.f90 @@ -551,9 +551,7 @@ subroutine cmd_run(settings,test) toomany= size(settings%name)==0 .and. size(executables)>1 if ( any(.not.found) & & .or. & - & ( (toomany .and. .not.test) .or. (toomany .and. settings%runner /= '') ) & - & .and. & - & .not.settings%list) then + & (toomany .and. .not.test) .and. .not. settings%list) then line=join(settings%name) if(line/='.')then ! do not report these special strings if(any(.not.found))then From f210e9d966381203ac932de985168668731a12f4 Mon Sep 17 00:00:00 2001 From: davidpfister Date: Fri, 7 Jun 2024 21:19:20 +0200 Subject: [PATCH 02/15] Update fpm_compiler.F90 (#1048) --- src/fpm_compiler.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fpm_compiler.F90 b/src/fpm_compiler.F90 index f173267659..1aa2581d00 100644 --- a/src/fpm_compiler.F90 +++ b/src/fpm_compiler.F90 @@ -235,7 +235,7 @@ module fpm_compiler flag_lfortran_opt = " --fast", & flag_lfortran_openmp = " --openmp", & flag_lfortran_implicit_typing = " --implicit-typing", & - flag_lfortran_implicit_external = " --allow-implicit-interface", & + flag_lfortran_implicit_external = " --implicit-interface", & flag_lfortran_fixed_form = " --fixed-form" character(*), parameter :: & From 78b2ed6770c711dbe59c1a00602bbd738eebc59a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 12:50:36 +0000 Subject: [PATCH 03/15] Bump actions/upload-artifact from 2 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/CI.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 16025d299a..bdace2c74a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -181,7 +181,7 @@ jobs: ci/run_tests.sh "$PWD/${{ env.FPM_RELEASE }}" - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ env.FPM_RELEASE }} path: ${{ env.FPM_RELEASE }} @@ -257,7 +257,7 @@ jobs: move fpm-installer.exe fpm-installer-${{ env.VERSION }}.exe - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: fpm-installer path: ci/fpm-installer-${{ env.VERSION }}.exe diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a37ca316b..2340aee851 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: PREFIX: fpm-${{ env.VERSION }}/ - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ env.OUTPUT }} path: ${{ env.OUTPUT }} @@ -104,7 +104,7 @@ jobs: ${{ env.EXE }} build - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ env.OUTPUT }} path: ${{ env.OUTPUT }} From 4c0b4ca9dd499f89d28c29edf64dfc1666b32592 Mon Sep 17 00:00:00 2001 From: gnikit Date: Sun, 21 Jan 2024 13:10:17 +0000 Subject: [PATCH 04/15] ci: update upload and download actions - upload uses unique names for artifacts - download merges unique artifacts to single loc --- .github/workflows/CI.yml | 12 +++++++----- .github/workflows/release.yml | 5 +++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bdace2c74a..a28c57b2d4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -183,7 +183,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.FPM_RELEASE }} + name: ${{ env.FPM_RELEASE }}-${{ matrix.os-arch }} path: ${{ env.FPM_RELEASE }} @@ -197,9 +197,10 @@ jobs: - uses: actions/checkout@v4 - name: Download Artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: - path: ${{ github.workspace }} # This will download all files + path: ${{ github.workspace }} + merge-multiple: true - name: Get version (normal) if: github.event_name != 'release' @@ -281,9 +282,10 @@ jobs: if: ${{ github.event_name == 'push' }} - name: Download Artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: - path: ${{ github.workspace }} # This will download all files + path: ${{ github.workspace }} + merge-multiple: true - name: Normalize file names for continuous delivery if: ${{ github.event_name == 'push' }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2340aee851..b0f2cc21f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -128,9 +128,10 @@ jobs: if: ${{ github.event_name == 'push' }} - name: Download Artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: - path: ${{ github.workspace }} # This will download all files + path: ${{ github.workspace }} + merge-multiple: true - name: Normalize file names for continuous delivery if: ${{ github.event_name == 'push' }} From c305d12696a897aea5ca7518a82f2971e2d8155f Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Sun, 9 Jun 2024 08:27:41 +0200 Subject: [PATCH 05/15] do not restrict dumping `available names` to `run` only --- src/fpm.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fpm.f90 b/src/fpm.f90 index b6156e3bf3..b23fee95d6 100644 --- a/src/fpm.f90 +++ b/src/fpm.f90 @@ -551,7 +551,7 @@ subroutine cmd_run(settings,test) toomany= size(settings%name)==0 .and. size(executables)>1 if ( any(.not.found) & & .or. & - & (toomany .and. .not.test) .and. .not. settings%list) then + & (toomany .and. .not. settings%list) ) then line=join(settings%name) if(line/='.')then ! do not report these special strings if(any(.not.found))then From 60ae9d53e825ba0f8dc147c313ef6e3cf7828b90 Mon Sep 17 00:00:00 2001 From: gnikit Date: Sun, 21 Jan 2024 13:15:07 +0000 Subject: [PATCH 06/15] ci: add GCC versions in artifact name --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a28c57b2d4..cda22bbc2d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -173,7 +173,7 @@ jobs: rm -v ${{ env.FPM }} echo "FPM_RELEASE=${{ env.EXE }}" >> $GITHUB_ENV env: - EXE: fpm-${{ env.VERSION }}-${{ matrix.os-arch }}${{ matrix.exe }} + EXE: fpm-${{ env.VERSION }}-${{ matrix.os-arch }}-gcc-${{ matrix.gcc_v }}${{ matrix.exe }} - name: Run release version shell: bash @@ -183,7 +183,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.FPM_RELEASE }}-${{ matrix.os-arch }} + name: ${{ env.FPM_RELEASE }} path: ${{ env.FPM_RELEASE }} From 1b0784f2cffe1315ab808171468ce0ecd5c29771 Mon Sep 17 00:00:00 2001 From: gnikit Date: Mon, 3 Jun 2024 23:56:18 +0100 Subject: [PATCH 07/15] ci: give unique names to make-installer upload artefacts --- .github/workflows/CI.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cda22bbc2d..36f80e8dfb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -255,13 +255,13 @@ jobs: run: | cd ./ci makensis fpm-installer.nsi - move fpm-installer.exe fpm-installer-${{ env.VERSION }}.exe + move fpm-installer.exe fpm-installer-${{ env.VERSION }}-gcc-${{ matrix.gcc_v }}.exe - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: fpm-installer - path: ci/fpm-installer-${{ env.VERSION }}.exe + name: fpm-installer-gcc-${{ matrix.gcc_v }} + path: ci/fpm-installer-${{ env.VERSION }}-gcc-${{ matrix.gcc_v }}.exe upload-artifacts: if: ${{ github.event_name == 'release' && contains(github.ref, 'v') || github.event_name == 'push' }} From f796069d42dec1a870c670068bfcbfd78a6595c8 Mon Sep 17 00:00:00 2001 From: gnikit Date: Sat, 8 Jun 2024 23:10:33 +0100 Subject: [PATCH 08/15] ci: make GCC specific Windows installers --- .github/workflows/CI.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 36f80e8dfb..9253c4b4eb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -192,6 +192,10 @@ jobs: runs-on: windows-latest needs: - build + strategy: + fail-fast: false + matrix: + gcc_v: [10,11,12] steps: - uses: actions/checkout@v4 @@ -200,7 +204,7 @@ jobs: uses: actions/download-artifact@v4 with: path: ${{ github.workspace }} - merge-multiple: true + pattern: fpm-*-windows-*-gcc-${{ matrix.gcc_v }}.exe - name: Get version (normal) if: github.event_name != 'release' @@ -230,7 +234,7 @@ jobs: - name: Fetch Windows executable shell: msys2 {0} run: | - cp fpm-*/fpm*.exe ./ci/fpm.exe + cp fpm-*/fpm-*-windows-*-gcc-${{ matrix.gcc_v }}.exe ./ci/fpm.exe - name: Fetch Git for Windows shell: msys2 {0} From a663b5da0a184475f8462dc03d9ca47724d15ed1 Mon Sep 17 00:00:00 2001 From: gnikit Date: Sun, 9 Jun 2024 11:12:56 +0100 Subject: [PATCH 09/15] ci: fix CD artifact creation --- .github/workflows/CI.yml | 14 ++++++-------- .github/workflows/release.yml | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9253c4b4eb..c906dfe220 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -288,26 +288,24 @@ jobs: - name: Download Artifacts uses: actions/download-artifact@v4 with: - path: ${{ github.workspace }} + path: fpm-cd-artifacts merge-multiple: true - name: Normalize file names for continuous delivery if: ${{ github.event_name == 'push' }} run: | - for output in fpm-*/fpm*; do - pushd $(dirname "$output") + cd fpm-cd-artifacts + for output in fpm-*; do mv -v $(basename $output) $(basename $output | sed -E '${{ env.replace }}') - popd done env: replace: 's/-([0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g)?[0-9a-f]+//' - name: Create SHA256 checksums run: | - for output in fpm-*/fpm*; do - pushd $(dirname "$output") + cd fpm-cd-artifacts + for output in fpm-*; do sha256sum $(basename "$output") | tee $(basename "$output").sha256 - popd done - name: Move/Create continuous tag @@ -321,7 +319,7 @@ jobs: if: ${{ github.event_name == 'release' || steps.deploy-on-push.outputs.result != 0 }} with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: fpm-*/fpm* + file: fpm-cd-artifacts/* file_glob: true tag: ${{ github.event_name == 'release' && github.ref || 'current'}} overwrite: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0f2cc21f1..d55c190e75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -130,26 +130,24 @@ jobs: - name: Download Artifacts uses: actions/download-artifact@v4 with: - path: ${{ github.workspace }} + path: fpm-cd-artifacts merge-multiple: true - name: Normalize file names for continuous delivery if: ${{ github.event_name == 'push' }} run: | - for output in fpm-*/fpm*; do - pushd $(dirname "$output") + cd fpm-cd-artifacts + for output in fpm-*; do mv -v $(basename $output) $(basename $output | sed -E '${{ env.replace }}') - popd done env: replace: 's/-([0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g)?[0-9a-f]+//' - name: Create SHA256 checksums run: | - for output in fpm-*/fpm*; do - pushd $(dirname "$output") + cd fpm-cd-artifacts + for output in fpm-*; do sha256sum $(basename "$output") | tee $(basename "$output").sha256 - popd done - name: Move/Create continuous tag @@ -163,7 +161,7 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: fpm-*/fpm* + file: fpm-cd-artifacts/* file_glob: true tag: ${{ github.event_name == 'release' && github.ref || 'current'}} overwrite: true From b50244c54189659aaa53a1f92c2bcc2c2a425a43 Mon Sep 17 00:00:00 2001 From: gnikit Date: Sun, 9 Jun 2024 20:31:54 +0100 Subject: [PATCH 10/15] ci: select only GCC 12 artifacts --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c906dfe220..778f8f40da 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -289,6 +289,7 @@ jobs: uses: actions/download-artifact@v4 with: path: fpm-cd-artifacts + pattern: 'fpm-*-gcc-12*' merge-multiple: true - name: Normalize file names for continuous delivery From 6cb9a74aa3afd5af51e11457722da015f65ab6e6 Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Thu, 6 Jun 2024 22:48:19 +0200 Subject: [PATCH 11/15] run all tests with user-specified runner --- src/fpm.f90 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/fpm.f90 b/src/fpm.f90 index b162ff2827..b6156e3bf3 100644 --- a/src/fpm.f90 +++ b/src/fpm.f90 @@ -551,9 +551,7 @@ subroutine cmd_run(settings,test) toomany= size(settings%name)==0 .and. size(executables)>1 if ( any(.not.found) & & .or. & - & ( (toomany .and. .not.test) .or. (toomany .and. settings%runner /= '') ) & - & .and. & - & .not.settings%list) then + & (toomany .and. .not.test) .and. .not. settings%list) then line=join(settings%name) if(line/='.')then ! do not report these special strings if(any(.not.found))then From 0cf3a9f20eaffaf1117d10732517fd5284d34870 Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Mon, 10 Jun 2024 05:46:29 -0500 Subject: [PATCH 12/15] add test --- ci/run_tests.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 0b7fc8e057..01c85891a8 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -81,14 +81,30 @@ do echo "$filename" "$fpm" ${cmdrun[$j]} $filename test -e $filename.txt + # non-i-th tests should not have run for k in ${others[@]} do test ! -e ${targets[$k]}$k.txt done done done + +# Test building all test targets +cmdrun=( "test" "test --runner time" ) +for j in {0..1} +do + rm -f *.txt + "$fpm" ${cmdrun[$j]} + # all tests should have run + for k in ${cases[@]} + do + test -e test$k.txt + done +done + popd + pushd auto_discovery_off "$fpm" build "$fpm" run --target auto_discovery_off From 7b1efc7be26fb4cbf42cfbc436da2822a9f09fa2 Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Mon, 10 Jun 2024 07:10:35 -0500 Subject: [PATCH 13/15] do not use `time` in windows --- ci/run_tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 01c85891a8..888111e5e0 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -89,7 +89,8 @@ do done done -# Test building all test targets +# Test building all test targets and with runner +if [[ "$(which time)" ]]; then cmdrun=( "test" "test --runner time" ) for j in {0..1} do @@ -101,6 +102,7 @@ do test -e test$k.txt done done +fi popd From ee2a8b60e43a42c59c27f5185becea3f20cadf47 Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Thu, 20 Jun 2024 08:03:31 +0200 Subject: [PATCH 14/15] run/example: run all if name not specified --- src/fpm.f90 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/fpm.f90 b/src/fpm.f90 index b6156e3bf3..561fb4e5e9 100644 --- a/src/fpm.f90 +++ b/src/fpm.f90 @@ -486,7 +486,6 @@ subroutine cmd_run(settings,test) integer :: run_scope,firsterror integer, allocatable :: stat(:),target_ID(:) character(len=:),allocatable :: line - logical :: toomany call get_package_data(package, "fpm.toml", error, apply_defaults=.true.) if (allocated(error)) then @@ -547,11 +546,8 @@ subroutine cmd_run(settings,test) end if ! Check all names are valid - ! or no name and found more than one file - toomany= size(settings%name)==0 .and. size(executables)>1 - if ( any(.not.found) & - & .or. & - & (toomany .and. .not.test) .and. .not. settings%list) then + ! or no name and found more than one file + if ( any(.not.found) ) then line=join(settings%name) if(line/='.')then ! do not report these special strings if(any(.not.found))then From c30932274e7178ce415a980fd9f9572b9c590188 Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Thu, 20 Jun 2024 08:08:48 +0200 Subject: [PATCH 15/15] test default runs --- ci/run_tests.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 888111e5e0..c1abbb5e7f 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -89,21 +89,25 @@ do done done -# Test building all test targets and with runner +# Test building all targets and with runner if [[ "$(which time)" ]]; then -cmdrun=( "test" "test --runner time" ) -for j in {0..1} +targets=( "run" "run --example" "test" ) +names=( "run" "example" "test" ) +cmdrun=( " " " --runner time" ) +for j in {0..2} do - rm -f *.txt - "$fpm" ${cmdrun[$j]} - # all tests should have run - for k in ${cases[@]} + for i in {0..1} do - test -e test$k.txt + rm -f *.txt + "$fpm" ${targets[$j]}${cmdrun[$i]} + # all targets should have run + for k in ${cases[@]} + do + test -e ${names[$j]}$k.txt + done done done fi - popd