From 213f024ac4fc6275ad565688c7706a611c8ce56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 16 Sep 2024 02:13:26 -0400 Subject: [PATCH 1/3] CI(macOS): Use micromamba-shell for steps to load PATH changes (#4325) Fixes problems with loading environment variables and path on the newest GitHub Actions macOS 20240911.3 runner image, that makes all builds fail. * CI(macOS): Use micromamba-shell for build and install * CI(macOS): Use micromamba-shell for printing versions * CI(macOS): Use micromamba-shell for pytest and gunittest --- .github/workflows/macos.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index eb99b6ff7a7..b74b2b042c9 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -59,17 +59,17 @@ jobs: - name: Create installation directory run: mkdir $HOME/install - name: Build and install - shell: bash -l {0} + shell: micromamba-shell {0} run: source ./.github/workflows/macos_install.sh $HOME/install - name: Add the bin directory to PATH run: echo "$HOME/install/bin" >> $GITHUB_PATH - name: Check installed version if: ${{ !cancelled() }} - shell: bash -l {0} + shell: micromamba-shell {0} run: source ./.github/workflows/print_versions.sh - name: Run pytest with multiple workers in parallel - shell: bash -el {0} + shell: micromamba-shell {0} run: | export PYTHONPATH=$(grass --config python_path):$PYTHONPATH export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH @@ -78,7 +78,7 @@ jobs: -ra . \ -m 'not needs_solo_run' - name: Run pytest with a single worker (for tests marked with needs_solo_run) - shell: bash -el {0} + shell: micromamba-shell {0} run: | export PYTHONPATH=$(grass --config python_path):$PYTHONPATH export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH @@ -87,7 +87,7 @@ jobs: -m 'needs_solo_run' - name: Run gunittest tests - shell: bash -el {0} + shell: micromamba-shell {0} run: | grass --tmp-project XY --exec \ g.download.project url=${{ env.SampleData }} path=$HOME From 63a80f5c198a48ecf741a9bb97d6d37106651f12 Mon Sep 17 00:00:00 2001 From: Mohan Yelugoti Date: Mon, 16 Sep 2024 02:22:55 -0400 Subject: [PATCH 2/3] lib/linkm: Change non-returning internal function types to void (#4318) --- lib/linkm/test/try.c | 6 +++--- lib/linkm/test/try2.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/linkm/test/try.c b/lib/linkm/test/try.c index 4f2a431e003..3b71b6f684a 100644 --- a/lib/linkm/test/try.c +++ b/lib/linkm/test/try.c @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) exit(0); } -int add_link_rev(struct link *List, struct link *link) +void add_link_rev(struct link *List, struct link *link) { struct link *p; @@ -70,7 +70,7 @@ int add_link_rev(struct link *List, struct link *link) link->next = p; } -int add_link(struct link *List, struct link *link) +void add_link(struct link *List, struct link *link) { struct link *p; @@ -81,7 +81,7 @@ int add_link(struct link *List, struct link *link) link->next = NULL; } -int dumplist(struct link *List) +void dumplist(struct link *List) { struct link *p; diff --git a/lib/linkm/test/try2.c b/lib/linkm/test/try2.c index ad226826795..7eb153f16f3 100644 --- a/lib/linkm/test/try2.c +++ b/lib/linkm/test/try2.c @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) exit(0); } -int add_link_rev(struct link *List, struct link *link) +void add_link_rev(struct link *List, struct link *link) { struct link *p; @@ -72,7 +72,7 @@ int add_link_rev(struct link *List, struct link *link) link->next = p; } -int add_link(struct link *List, struct link *link) +void add_link(struct link *List, struct link *link) { struct link *p; @@ -83,7 +83,7 @@ int add_link(struct link *List, struct link *link) link->next = NULL; } -int dumplist(struct link *List) +void dumplist(struct link *List) { struct link *p; From d0f1634cfe08ed6adda7ce2513d363898bf5b347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 16 Sep 2024 03:55:03 -0400 Subject: [PATCH 3/3] CI(OSGeo4W): Add -pipe to CFLAGS and CXXFLAGS to reduce build time (#4326) With the current GitHub Hosted runners, the build step time is reduced by about 2 minutes, down to about 8min30 instead of about 10min30, for the couple builds I observed --- .github/workflows/osgeo4w.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osgeo4w.yml b/.github/workflows/osgeo4w.yml index 2f17427b05d..2b92c254238 100644 --- a/.github/workflows/osgeo4w.yml +++ b/.github/workflows/osgeo4w.yml @@ -66,7 +66,10 @@ jobs: - name: Compile GRASS GIS shell: msys2 {0} - run: .github/workflows/build_osgeo4w.sh + run: | + export CFLAGS="${CFLAGS} -pipe" + export CXXFLAGS="${CXXFLAGS} -pipe" + .github/workflows/build_osgeo4w.sh - name: Print installed versions if: always()