mirror of
https://github.com/cellos51/balatro-gba.git
synced 2026-04-24 23:30:17 -05:00
* Added C standard gnu23 to the makefile * Added gnu23 standard to all test modue makefiles * Added installation of latest gcc version to tests workflow * Fixed typo in previous commit * Made GCC 14 installation conditional and moved from the workflow to the script * Extracted GCC version check to external script for CI and created tests README * Added #!/bin/bash * Make check_gcc_version.sh executable
17 lines
550 B
Bash
Executable File
17 lines
550 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Check GCC version and install GCC 14 if needed
|
|
check_gcc_version() {
|
|
if command -v gcc &> /dev/null; then
|
|
gcc_version=$(gcc -dumpversion | cut -d. -f1)
|
|
if [ "$gcc_version" -lt 14 ]; then
|
|
echo "GCC version $gcc_version detected. Installing GCC 14..."
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc-14
|
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
|
|
echo "GCC 14 installed and set as default."
|
|
fi
|
|
fi
|
|
}
|
|
|
|
check_gcc_version |