Feature/nav 160 create gtfs subset writer app #155
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake Build Matrix | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
include: | |
- os: windows-latest | |
compiler: msvc | |
# - os: ubuntu-latest | |
# compiler: gcc-linux | |
- os: ubuntu-latest | |
compiler: clang-linux | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
# - name: Install GCC 14.2 on Ubuntu | |
# if: matrix.compiler == 'gcc-linux' | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y wget lsb-release software-properties-common | |
# wget https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz | |
# tar -xf gcc-14.2.0.tar.xz | |
# cd gcc-14.2.0 | |
# ./contrib/download_prerequisites | |
# mkdir build && cd build | |
# ../configure --enable-languages=c,c++ --disable-multilib | |
# make -j$(nproc) | |
# sudo make install | |
# sudo update-alternatives --install /usr/bin/gcc gcc /usr/local/bin/gcc 60 | |
# sudo update-alternatives --install /usr/bin/g++ g++ /usr/local/bin/g++ 60 | |
- name: Install Clang 18.1.8 on Ubuntu | |
if: matrix.compiler == 'clang-linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y wget lsb-release software-properties-common | |
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz | |
tar -xf clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-22.04.tar.xz | |
sudo cp -r clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-22.04/* /usr/local/ | |
sudo update-alternatives --install /usr/bin/clang clang /usr/local/bin/clang 100 | |
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/local/bin/clang++ 100 | |
- name: vcpkg installation | |
shell: bash | |
run: | | |
git clone https://github.com/microsoft/vcpkg.git | |
cd vcpkg | |
if [[ "${{ runner.os }}" == "Windows" ]]; then | |
./bootstrap-vcpkg.bat | |
else | |
./bootstrap-vcpkg.sh | |
fi | |
./vcpkg integrate install | |
./vcpkg install | |
- name: Cache vcpkg packages | |
uses: actions/[email protected] | |
with: | |
path: | | |
${{ github.workspace }}/vcpkg/installed | |
${{ github.workspace }}/vcpkg/vcpkg | |
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json') }} | |
restore-keys: | | |
${{ runner.os }}-vcpkg- | |
- name: Configure CMake | |
run: | | |
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake | |
- name: Build | |
run: | | |
cmake --build build --config Release | |
- name: List contents of output directory | |
run: | | |
echo "Contents of output directory:" | |
ls -R ${{ github.workspace }}/output/bin/release | |
# - name: Run tests | |
# run: | | |
# ctest --test-dir ${{ github.workspace }}/output/bin/release --output-on-failure -C Release |