Skip to content

Commit

Permalink
Try to use older Linuxes.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpartanJ committed Oct 2, 2024
1 parent 5057208 commit 4f97589
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/ecode-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ jobs:
Builds that include most recent changes as they happen. For stable releases check the whole list of [releases](https://github.com/SpartanJ/ecode/releases).
build_linux_x86_64:
name: Linux Nightly
name: Linux x86_64 Nightly
needs: release
strategy:
matrix:
config:
- arch: x86_64
container: ubuntu-20.04
container: ubuntu-18.04
runs-on: ${{ matrix.config.container }}
env:
CC: gcc
Expand All @@ -74,6 +74,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get install -y libfuse2 fuse premake4 mesa-common-dev libgl1-mesa-dev
bash projects/linux/scripts/install_gcc.sh
bash projects/linux/scripts/install_sdl2.sh
- name: Build ecode
run: |
Expand All @@ -89,14 +90,13 @@ jobs:
projects/linux/ecode/ecode-linux-${{ env.INSTALL_REF }}-${{ env.RARCH }}.tar.gz
build_linux_arm64:
name: Linux Nightly
name: Linux arm64 Nightly
needs: release
strategy:
matrix:
config:
- arch: aarch64
container: ubuntu-22.04
codename: jammy
container: ubuntu-20.04
runs-on: ${{ matrix.config.container }}
env:
CC: gcc
Expand All @@ -120,12 +120,13 @@ jobs:
echo $(gcc --version)
- name: Update Packages
run: |
codename=$(lsb_release -cs)
url="http://ports.ubuntu.com/ubuntu-ports"
repos="main restricted universe multiverse"
echo "deb [arch=arm64] $url ${{ matrix.config.codename }} $repos" > arm64.list
echo "deb [arch=arm64] $url ${{ matrix.config.codename }}-updates $repos" >> arm64.list
echo "deb [arch=arm64] $url ${{ matrix.config.codename }}-security $repos" >> arm64.list
echo "deb [arch=arm64] $url ${{ matrix.config.codename }}-backports $repos" >> arm64.list
echo "deb [arch=arm64] $url $codename $repos" > arm64.list
echo "deb [arch=arm64] $url $codename-updates $repos" >> arm64.list
echo "deb [arch=arm64] $url $codename-security $repos" >> arm64.list
echo "deb [arch=arm64] $url $codename-backports $repos" >> arm64.list
sudo mv arm64.list /etc/apt/sources.list.d/
sudo apt-get update
sudo dpkg --add-architecture arm64
Expand Down
26 changes: 26 additions & 0 deletions projects/linux/scripts/install_gcc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# Exit script on error
set -e

# Specify the GCC version you want to install (e.g., 9, 10, 11)
GCC_VERSION=11

# Add the PPA for newer GCC versions
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update

# Install the specified GCC version and its g++ counterpart
sudo apt-get install -y gcc-$GCC_VERSION g++-$GCC_VERSION

# Update the alternatives to set the specified GCC version as the default
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$GCC_VERSION 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-$GCC_VERSION 100
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 100
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-$GCC_VERSION 100

# Confirm installation
gcc --version
g++ --version

echo "GCC $GCC_VERSION installation is complete and set as the default."

0 comments on commit 4f97589

Please sign in to comment.