Terminal/Scrollable #810
This file contains hidden or 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: "CI C++: Linux" | |
| on: [ push, pull_request ] | |
| jobs: | |
| build: | |
| name: Ubuntu (${{ matrix.compiler.name }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: | |
| # - { | |
| # name: "GCC 13 (apt)", | |
| # cc: "gcc", | |
| # cxx: "g++", | |
| # install: "sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get install -y gcc-13 g++-13", | |
| # alternative-cc: "sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13", | |
| # alternative-cxx: "sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13" | |
| # } | |
| # - { # https://apt.llvm.org | |
| # name: "Clang 19 (apt)", | |
| # cc: "clang", | |
| # cxx: "clang++", | |
| # install: "sudo wget https://apt.llvm.org/llvm.sh && sudo chmod +x llvm.sh && sudo ./llvm.sh 19 ''", | |
| # alternative-cc: "sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 19", | |
| # alternative-cxx: "sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 19" | |
| # } | |
| - { | |
| name: "Latest Clang", | |
| cc: "clang", | |
| cxx: "clang++", | |
| xmake-toolchain: "--toolchain=llvm --sdk=llvm/" | |
| } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: xmake-io/github-action-setup-xmake@v1 | |
| with: | |
| xmake-version: branch@master | |
| - name: Install ${{ matrix.compiler.name }} from a package manager | |
| if: ${{ matrix.compiler.install }} | |
| run: | | |
| ${{ matrix.compiler.install }} | |
| ${{ matrix.compiler.alternative-cc }} | |
| ${{ matrix.compiler.alternative-cxx }} | |
| - name: Install Latest Clang | |
| if: ${{ matrix.compiler.name == 'Latest Clang' }} | |
| uses: MorganCaron/latest-clang-action@master | |
| - name: Update xmake repository | |
| run: xmake repo --update | |
| - name: Configure & Install dependencies | |
| run: | | |
| xmake f ${{ matrix.compiler.xmake-toolchain }} --runtimes="c++_shared" --enable_tests=y -v --yes | |
| - name: Build | |
| run: | | |
| xmake build -v | |
| - name: Run tests | |
| run: | | |
| xmake run |