Nix development env for linux #977
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: Build linux | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-24.04] | |
arch: [x64] | |
mode: [debug] | |
runs-on: ${{ matrix.os }} | |
if: "!contains(github.event.head_commit.message, 'ci skip')" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout submodules | |
run: | | |
git submodule sync --recursive | |
git submodule update --init --force --recursive --depth=1 | |
- name: Setup development environment with nix | |
uses: cachix/install-nix-action@v27 | |
with: | |
github_access_token: ${{ secrets.GH_TOKEN }} | |
- run: nix flake check | |
# Kickoff install in its own step - it will be cached anyway | |
- name: Fetch build tools | |
run: nix develop | |
- name: Build | |
run: nix develop --command bash -c 'xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --yes && xmake' |