11name : build
22on : [push, pull_request]
3+
4+ permissions :
5+ contents : read
6+
37jobs :
48 build :
59 name : " ${{ matrix.id }}"
2125 pkg : " gcc g++"
2226 - id : " distcheck-debian-stable-amd64-gcc"
2327 task : " distcheck"
24- configure-args : " --enable-ja-rule --enable-e133 --enable-rdm-tests --enable-java-libs "
28+ configure-args : " --enable-ja-rule --enable-e133 --enable-rdm-tests"
2529 # TODO(Perry): Fix Debian 12 OOM issue on GitHub Actions
2630 container : " debian:stable"
2731 compiler :
3034 pkg : " gcc g++"
3135 - id : " distcheck-debian-stable-amd64-clang"
3236 task : " distcheck"
33- configure-args : " --enable-ja-rule --enable-e133 --enable-rdm-tests --enable-java-libs "
37+ configure-args : " --enable-ja-rule --enable-e133 --enable-rdm-tests"
3438 # TODO(Perry): Fix Debian 12 OOM issue on GitHub Actions
3539 container : " debian:stable"
3640 compiler :
@@ -50,13 +54,15 @@ jobs:
5054 run : apt-get update -y
5155 # See comments beginning at
5256 # https://github.com/actions/runner/issues/763#issuecomment-1435474884
53- # Without Git, actions/checkout@v3 will resort to REST and will not
57+ # Without Git, actions/checkout@v4 will resort to REST and will not
5458 # create a .git folder or .git.config. The Problem Matcher looks for
5559 # .git/config to find where the root of the repo is, so it must be
5660 # present.
5761 - name : Install Git
5862 run : apt-get -y install git
59- - uses : actions/checkout@v3
63+ - uses : actions/checkout@v4
64+ with :
65+ persist-credentials : false
6066 - name : Install build tools
6167 shell : bash
6268 run : |
@@ -90,17 +96,18 @@ jobs:
9096 - name : Autoreconf
9197 run : sudo --preserve-env -u builduser env "PATH=$PATH" autoreconf -i
9298 - name : Set configure arguments
99+ # Env var name DISTCHECK_CONFIGURE_FLAGS must be used, see #1881 and #1883
93100 run : |
94- echo "GH_OLA_CONFIGURE_ARGS =${{ matrix.configure-args }}" >> $GITHUB_ENV
101+ echo "DISTCHECK_CONFIGURE_FLAGS =${{ matrix.configure-args }}" >> $GITHUB_ENV
95102 - name : Set additional Linux configure arguments
96103 if : runner.os == 'Linux'
97104 # Silence all deprecated declarations on Linux due to auto_ptr making the build log too long
98105 run : |
99- echo "GH_OLA_CONFIGURE_ARGS=$GH_OLA_CONFIGURE_ARGS CPPFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV
106+ echo "DISTCHECK_CONFIGURE_FLAGS=$DISTCHECK_CONFIGURE_FLAGS CPPFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV
100107 - name : Print configure command
101- run : echo "./configure $GH_OLA_CONFIGURE_ARGS "
108+ run : echo "./configure $DISTCHECK_CONFIGURE_FLAGS "
102109 - name : Configure
103- run : sudo --preserve-env -u builduser env "PATH=$PATH" ./configure $GH_OLA_CONFIGURE_ARGS
110+ run : sudo --preserve-env -u builduser env "PATH=$PATH" ./configure $DISTCHECK_CONFIGURE_FLAGS
104111 - name : ${{ matrix.task }}
105112 run : sudo --preserve-env -u builduser env "PATH=$PATH" make ${{ matrix.task }} -j${{ steps.num-cpu-cores.outputs.NUM_CPU_CORES }} VERBOSE=1
106113 - name : Display structure of the built files
@@ -113,19 +120,20 @@ jobs:
113120 # actually exclude it, so it must first be touched
114121 run : |
115122 touch ola-${{ matrix.id }}-source-tree.tar.gz
116- tar --exclude=ola-${{ matrix.id }}-source-tree.tar.gz -cvzf ola-${{ matrix.id }}-source-tree.tar.gz .
123+ touch .git
124+ tar --exclude=ola-${{ matrix.id }}-source-tree.tar.gz --exclude=.git -cvzf ola-${{ matrix.id }}-source-tree.tar.gz .
117125 - name : SHA256 artifact archives
118126 if : always()
119127 run : sha256sum ola-*.tar.gz
120128 - name : Upload source tree artifact
121- uses : actions/upload-artifact@v3
129+ uses : actions/upload-artifact@v4
122130 if : always()
123131 with :
124132 name : ola-${{ matrix.id }}-source-tree
125133 path : ola-${{ matrix.id }}-source-tree.tar.gz
126134 - name : Upload built artifact
127135 if : matrix.task == 'distcheck' || matrix.task == 'dist'
128- uses : actions/upload-artifact@v3
136+ uses : actions/upload-artifact@v4
129137 with :
130138 name : ola-${{ matrix.id }}-dist
131139 path : |
@@ -146,7 +154,7 @@ jobs:
146154 flag-name : ${{ matrix.id }}
147155 - name : Upload coverage artifacts
148156 if : always() && matrix.task == 'coverage'
149- uses : actions/upload-artifact@v3
157+ uses : actions/upload-artifact@v4
150158 with :
151159 name : ola-${{ matrix.id }}-coverage
152160 path : coverage/
@@ -164,7 +172,7 @@ jobs:
164172 - id : " distcheck-debian-stable-amd64-clang"
165173 steps :
166174 - name : Download built source tree archive
167- uses : actions/download-artifact@v3
175+ uses : actions/download-artifact@v4
168176 with :
169177 name : ola-${{ matrix.id }}-source-tree
170178 path : .
0 commit comments