aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Poulhiès <dkm@kataplop.net>2024-11-27 11:00:32 +0100
committerPhilip Herron <philip.herron@embecosm.com>2024-11-27 15:04:10 +0000
commit8d401933dd2201f89e9ade61a88fa7773c662c35 (patch)
tree4b7ecea2025109124d8614251982f9e322d88aee
parentc4024137a3a3ff193683ac1765ff90265e0150d9 (diff)
downloadgcc-8d401933dd2201f89e9ade61a88fa7773c662c35.zip
gcc-8d401933dd2201f89e9ade61a88fa7773c662c35.tar.gz
gcc-8d401933dd2201f89e9ade61a88fa7773c662c35.tar.bz2
ci: change the gcc-5 testing
Use a GCC 5.4.0 built from Compiler Explorer and execute everything on ubuntu 22.04. Use the caching framework provided by github to avoid downloading every time from Compiler Explorer's servers. ChangeLog: * .github/workflows/ccpp.yml: Adjust to use gcc-5 on ubuntu 22.04. Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
-rw-r--r--.github/workflows/ccpp.yml54
1 files changed, 39 insertions, 15 deletions
diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml
index 1623bc3..dfb0906 100644
--- a/.github/workflows/ccpp.yml
+++ b/.github/workflows/ccpp.yml
@@ -269,7 +269,6 @@ jobs:
build-and-check-gcc-5:
runs-on: ubuntu-22.04
- container: ubuntu:18.04
env:
# otherwise we hang when installing tzdata
DEBIAN_FRONTEND: noninteractive
@@ -278,8 +277,8 @@ jobs:
- name: Install Deps
run: |
- apt-get update;
- apt-get install -y \
+ sudo apt-get update;
+ sudo apt-get install -y \
curl \
automake \
autoconf \
@@ -287,18 +286,38 @@ jobs:
autogen \
bison \
flex \
+ libc6-dev \
+ libc6-dev-i386 \
libgmp3-dev \
libmpfr-dev \
libmpc-dev \
build-essential \
- gcc-5 \
- g++-5 \
- gcc-5-multilib \
- g++-5-multilib \
dejagnu;
# install Rust directly using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
+ - name: Restore cached gcc-5.4
+ id: restore-gcc5
+ uses: actions/cache/restore@v4
+ with:
+ key: ce-tar-gcc-5
+ path: ~/gcc-5.4.0/
+
+ - name: Download and install gcc5.4
+ if: ${{ steps.restore-gcc5.outputs.cache-hit != 'true' }}
+ run: |
+ curl "https://s3.amazonaws.com/compiler-explorer/opt/gcc-5.4.0.tar.xz" -o /tmp/gcc.tar.xz;
+ cd ~;
+ tar xvf /tmp/gcc.tar.xz
+
+ - name: Store gcc-5.4 to cache
+ id: cache-gcc5
+ if: always() && steps.restore-gcc5.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v4
+ with:
+ key: ce-tar-gcc-5
+ path: ~/gcc-5.4.0/
+
- name: Make Source Read-Only
run: chmod -R a-w ./*
@@ -306,24 +325,29 @@ jobs:
run: |
mkdir -p gccrs-build;
cd gccrs-build;
- ../configure \
- CC='gcc-5' \
- CXX='g++-5' \
- --enable-languages=rust \
- --disable-bootstrap \
- --enable-multilib
+
+ # Add cargo to our path quickly
+ . "$HOME/.cargo/env";
+
+ PATH=$HOME/gcc-5.4.0/bin:$PATH \
+ ../configure \
+ --enable-languages=rust \
+ --disable-bootstrap \
+ --enable-multilib
- name: Build
shell: bash
run: |
# Add cargo to our path quickly
. "$HOME/.cargo/env";
- make -C gccrs-build -j $(nproc)
+ PATH=$HOME/gcc-5.4.0/bin:$PATH \
+ make -C gccrs-build -j $(nproc)
- name: Run Tests
run: |
cd gccrs-build; \
- make check-rust RUNTESTFLAGS="--target_board=unix\{-m32,-m64}"
+ PATH=$HOME/gcc-5.4.0/bin:$PATH \
+ make check-rust RUNTESTFLAGS="--target_board=unix\{-m32,-m64}"
- name: Archive check-rust results
uses: actions/upload-artifact@v3