Skip to content

ci: Upgrade C++ compiler on Ubuntu Focal to support C++20 compilation. #70

ci: Upgrade C++ compiler on Ubuntu Focal to support C++20 compilation.

ci: Upgrade C++ compiler on Ubuntu Focal to support C++20 compilation. #70

Workflow file for this run

name: "unit-tests"
on:
pull_request:
push:
schedule:
# Run daily at 00:15 UTC (the 15 is to avoid periods of high load)
- cron: "15 0 * * *"
workflow_dispatch:
permissions: {}
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
# Cancel in-progress jobs for efficiency
cancel-in-progress: true
jobs:
build-ystdlib-cpp:
strategy:
matrix:
os:
- "macos-latest"
- "ubuntu-20.04"
- "ubuntu-22.04"
- "ubuntu-24.04"
runs-on: "${{matrix.os}}"
steps:
- uses: "actions/checkout@v4"
with:
submodules: "recursive"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"
- name: "Install task"
shell: "bash"
run: "npm install -g @go-task/cli"
- if: "matrix.os == 'macos-latest'"
name: "Install coreutils (for md5sum)"
run: "brew install coreutils"
- if: "matrix.os == 'ubuntu-20.04'"
name: "Install gcc-10 (for c++20)"
run: |-
sudo ${{github.workspace}}/tools/scripts/install-gcc-10.sh
echo "export CC=/usr/bin/gcc-10" >> ~/.bashrc
echo "export CXX=/usr/bin/g++-10" >> ~/.bashrc
source ~/.bashrc
ls ~/.bashrc
cat ~/.bashrc
command -v gcc-10
command -v g++-10
- name: "Log tool versions"
run: |-
md5sum --version
python --version
tar --version
task --version
# TODO: Change the task to run all unittests once any unittest is added. Until then we check
# that building the project succeeds.
- run: "task build:target"