Add CI support for testing neovim configuration #1906
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: Build | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- bin | |
- .pre-commit-config.yaml | |
- README.md | |
- LICENSE | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- bin | |
- .pre-commit-config.yaml | |
- README.md | |
- LICENSE | |
jobs: | |
neovim: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: mindriot101-home | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Run custom nixvim | |
# -es means run in "batch" mode i.e. exit with non-0 exit code on | |
# errors | |
run: nix run .#nixvim -- -es | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
- run: df -h | |
- name: Increase build space | |
run: | | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf /usr/local/share/boost | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
sudo rm -rf /opt/hostedtoolcache/CodeQL | |
sudo docker image prune --all --force | |
- run: df -h | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: mindriot101-home | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- run: nix build '.#homeConfigurations.x86_64-linux.simon.activationPackage' | |
minimal: | |
strategy: | |
matrix: | |
runtime: | |
- os: ubuntu-latest | |
property: x86_64-linux | |
- os: macos-latest | |
property: x86_64-darwin | |
fail-fast: true | |
runs-on: ${{ matrix.runtime.os }} | |
steps: | |
- run: df -h | |
- name: Increase build space | |
if: ${{ matrix.runtime.os == 'ubuntu-latest' }} | |
run: | | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf /usr/local/share/boost | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
sudo rm -rf /opt/hostedtoolcache/CodeQL | |
sudo docker image prune --all --force | |
- run: df -h | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: mindriot101-home | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- run: nix build .#homeConfigurations.${{ matrix.runtime.property }}.minimal.activationPackage | |
nixvim: | |
strategy: | |
matrix: | |
runtime: | |
- os: ubuntu-latest | |
- os: macos-latest | |
runs-on: ${{ matrix.runtime.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: mindriot101-home | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- run: nix build .#nixvim | |
macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: mindriot101-home | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- run: nix build '.#homeConfigurations.x86_64-darwin.simon.activationPackage' |