File tree Expand file tree Collapse file tree 2 files changed +54
-1
lines changed Expand file tree Collapse file tree 2 files changed +54
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ inputs:
1010 description : ' Args for RUN_TEST_FLAGS'
1111 required : true
1212
13+ use-old-gcc :
14+ description : ' Version to use for old GCC'
15+ required : false
16+ default : ' '
17+
1318 warning_file :
1419 description : ' Filename with expected warnings'
1520 required : true
@@ -56,11 +61,39 @@ runs:
5661 run : chmod -R a-w ./*
5762 shell : bash
5863
64+ - name : Restore cached old gcc ${{ inputs.use-old-gcc }}
65+ if : inputs.use-old-gcc != ''
66+ id : restore-gcc5
67+ uses : actions/cache/restore@v4
68+ with :
69+ key : ce-tar-gcc-5
70+ path : ~/gcc-5.4.0/
71+
72+ - name : Download and install gcc5.4
73+ if : steps.restore-gcc5.outputs.cache-hit != 'true' && inputs.use-old-gcc != ''
74+ shell : bash
75+ run : |
76+ curl "https://s3.amazonaws.com/compiler-explorer/opt/gcc-5.4.0.tar.xz" -o /tmp/gcc.tar.xz;
77+ cd ~;
78+ tar xvf /tmp/gcc.tar.xz
79+
80+ - name : Store gcc-5.4 to cache
81+ id : cache-gcc5
82+ if : always() && steps.restore-gcc5.outputs.cache-hit != 'true' && inputs.use-old-gcc != ''
83+ uses : actions/cache/save@v4
84+ with :
85+ key : ce-tar-gcc-5
86+ path : ~/gcc-5.4.0/
87+
5988 - name : Configure GCC
6089 shell : bash
6190 run : |
6291 mkdir -p gccrs-build;
6392 cd gccrs-build;
93+ if [ -n "${{ inputs.use-old-gcc }}" ]; then
94+ export PATH=$HOME/gcc-5.4.0/bin:$PATH
95+ fi
96+
6497 if ${{ inputs.glibc_assertion }}; then
6598 export CXXFLAGS="$CXXFLAGS -D_GLIBCXX_ASSERTIONS"
6699 fi
Original file line number Diff line number Diff line change 7272 warning_file : ' log_expected_warnings'
7373 glibc_assertion : true
7474 enable_multilib : true
75+
76+ build-and-check-gcc-5 :
77+ env :
78+ # Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
79+ LC_ALL : C.UTF-8
80+
81+ runs-on : ubuntu-22.04
82+
83+ steps :
84+ - uses : actions/checkout@v4
85+
86+ - id : build-and-test
87+ uses : ./.github/actions/build-gcc
88+ with :
89+ extra-configure-env : ' '
90+ run_test_flags : ' --target_board=unix\{-m32}'
91+ warning_file : ' log_expected_warnings'
92+ glibc_assertion : false
93+ use-old-gcc : ' 5.4.0'
94+ enable_multilib : false
7595# build-and-check-ubuntu-64bit-glibcxx:
7696
7797# env:
@@ -241,7 +261,7 @@ jobs:
241261# exit 0; \
242262# fi
243263
244- # build-and-check-gcc-5:
264+ # build-and-check-gcc-5:
245265
246266# runs-on: ubuntu-22.04
247267# env:
You can’t perform that action at this time.
0 commit comments