Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Remove duplication in Ubuntu workflow #1749

Merged
merged 3 commits into from
Jul 22, 2021

Conversation

wenzeslaus
Copy link
Member

@wenzeslaus wenzeslaus commented Jul 20, 2021

matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before #1200
keeping the addition of a new build script and version-specific naming for the scripts.

Additionally, this now removes the build job and leaves only the test job in the workflow.

matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before OSGeo#1200
keeping the addition of a new build script and version-specific naming for the scripts.
@marisn
Copy link
Contributor

marisn commented Jul 20, 2021

I was looking at ci.yml file – did I read correctly that code for running tests is build for a second time? If so, we could get rid of build part as code building is tested also by the tests run.

…el, add empty lines between list items (maybe helpful; allowed by prettier)
@wenzeslaus wenzeslaus changed the title ci: Remove duplication introduced with PDAL ci: Remove duplication in Ubuntu workflow Jul 20, 2021
@wenzeslaus
Copy link
Member Author

...code for running tests is build for a second time? If so, we could get rid of build part as code building is tested also by the tests run.

That is correct. I wrote it this way because at that time it was the only workflow there and I wanted to have a separate build result from a test result. Build runs fast and you see it succeeded even when tests failed. Now we are in a different situation since we have build-only jobs in the GCC workflow. I removed the build-only job from Ubuntu and renamed it from CI to Ubuntu.

@wenzeslaus wenzeslaus marked this pull request as ready for review July 20, 2021 18:54
@wenzeslaus
Copy link
Member Author

wenzeslaus commented Jul 21, 2021

To perhaps clarify a bit what this is doing, here is the diff between the pre-PDAL-split state and pre-build-removal (git df 94bcea421..862126ddc -- .github/workflows/):

diff --git a/.github/workflows/build_ubuntu-18.04.sh b/.github/workflows/build_ubuntu-18.04.sh
new file mode 100755
index 000000000..68d10d6c8
--- /dev/null
+++ b/.github/workflows/build_ubuntu-18.04.sh
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+
+... [whole new file here]
diff --git a/.github/workflows/build.sh b/.github/workflows/build_ubuntu-20.04.sh
similarity index 100%
rename from .github/workflows/build.sh
rename to .github/workflows/build_ubuntu-20.04.sh
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 50fccaa5e..340a46775 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -34,7 +34,7 @@ jobs:
         run: |
           echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
       - name: Build
-        run: .github/workflows/build.sh $HOME/install
+        run: .github/workflows/build_${{ matrix.os }}.sh $HOME/install
 
   test:
     name: ${{ matrix.os }} tests
@@ -65,7 +65,7 @@ jobs:
         run: |
           echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
       - name: Build
-        run: .github/workflows/build.sh $HOME/install
+        run: .github/workflows/build_${{ matrix.os }}.sh $HOME/install
       - name: Add the bin directory to PATH
         run: |
           echo "$HOME/install/bin" >> $GITHUB_PATH
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index f1a561102..f6e65a1cf 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -50,7 +50,7 @@ jobs:
         env:
           CFLAGS: "-std=gnu11"
           CXXFLAGS: "-std=c++11"
-        run: .github/workflows/build.sh $HOME/install
+        run: .github/workflows/build_ubuntu-20.04.sh $HOME/install
 
       - name: Perform CodeQL Analysis
         uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml
index c0dd6de94..0efc9e647 100644
--- a/.github/workflows/gcc.yml
+++ b/.github/workflows/gcc.yml
@@ -45,4 +45,4 @@ jobs:
           CFLAGS: "-std=${{ matrix.c }}"
           # TODO: -pedantic-errors here won't compile
           CXXFLAGS: "-std=${{ matrix.cpp }}"
-        run: .github/workflows/build.sh $HOME/install
+        run: .github/workflows/build_ubuntu-20.04.sh $HOME/install

And then the other part is more or less simply removing the build job and leaving only test there (plus renames).

@wenzeslaus wenzeslaus requested a review from marisn July 21, 2021 02:30
@wenzeslaus wenzeslaus added the CI Continuous integration label Jul 21, 2021
@wenzeslaus
Copy link
Member Author

@marisn Please see if it makes more sense now.

Copy link
Contributor

@marisn marisn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, now this is much better than anything I've done.

@wenzeslaus wenzeslaus merged commit b77880d into OSGeo:master Jul 22, 2021
@wenzeslaus wenzeslaus deleted the deduplciate-ubuntu-ci branch July 22, 2021 02:46
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 23, 2021
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
a0x8o added a commit to a0x8o/grass that referenced this pull request May 9, 2024
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
a0x8o added a commit to a0x8o/grass that referenced this pull request May 21, 2024
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 3, 2024
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 17, 2024
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 17, 2024
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 27, 2024
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 2, 2024
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 10, 2024
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 23, 2024
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 23, 2024
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 31, 2024
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
a0x8o added a commit to a0x8o/grass that referenced this pull request Aug 13, 2024
…1749)

Remove duplication introduced with PDAL: matrix.os has the name of the the system which is used in the YAML.
This basically returns the CI YAML files state to what it was before the change, but
keeping the addition of a new build script and version-specific naming for the scripts.

Remove the separate Ubuntu build, keep only the test job, rename CI to Ubuntu.
There is no need for a separate build anymore since GCC workflows now do that.

Additionally, fix CentOS label, add empty lines between list items (maybe helpful; allowed by prettier).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants