-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
Conversation
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.
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)
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. |
To perhaps clarify a bit what this is doing, here is the diff between the pre-PDAL-split state and pre-build-removal ( 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). |
@marisn Please see if it makes more sense now. |
There was a problem hiding this 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.
…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).
…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).
…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).
…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).
…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).
…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).
…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).
…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).
…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).
…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).
…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).
…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).
…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).
…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).
…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).
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.