Skip to content

Add nix flake config #199

Add nix flake config

Add nix flake config #199

Workflow file for this run

name: xmake
on:
push:
branches: [ non-existent-branch ]
pull_request:
branches: [ non-existent-branch ]
paths-ignore:
- '.clang-format'
- '.clangd'
- '.gitignore'
- 'LICENSE'
- 'README.md'
- '.github/workflows/cmake.yml'
jobs:
linux:
strategy:
matrix:
os: [ubuntu-24.04]
build_type: [release, debug]
runs-on: ${{ matrix.os }}
steps:
- name: Setup llvm & libstdc++ & cmake & ninja
run: |
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y gcc-14 g++-14 libstdc++-14-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
sudo update-alternatives --set gcc /usr/bin/gcc-14
sudo update-alternatives --set g++ /usr/bin/g++-14
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 20 all
sudo apt install -y cmake ninja-build
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@master
actions-cache-folder: '.xmake-cache'
actions-cache-key: ${{ matrix.os }}
package-cache: true
package-cache-key: ${{ matrix.os }}
build-cache: true
build-cache-key: ${{ matrix.os }}-${{ matrix.build_type }}
- name: Xmake configure
run: |
xmake config --yes --mode=${{ matrix.build_type }} --toolchain=clang-20
- name: Build clice
run: |
xmake build --verbose --diagnosis --all
- name: Run tests
run: xmake test --verbose
windows:
strategy:
matrix:
os: [windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Setup llvm
uses: MinoruSekine/[email protected]
with:
buckets: main
apps: llvm
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@master
actions-cache-folder: '.xmake-cache'
actions-cache-key: ${{ matrix.os }}
package-cache: true
package-cache-key: ${{ matrix.os }}
build-cache: true
build-cache-key: ${{ matrix.os }}-${{ matrix.build_type }}
- name: Xmake configure
run: |
xmake config --yes --toolchain=clang
- name: Build clice
run: |
xmake build --verbose --diagnosis --all
- name: Run tests
run: xmake test --verbose