Skip to content

flake: add specific nixpkgs input and update #129

flake: add specific nixpkgs input and update

flake: add specific nixpkgs input and update #129

Workflow file for this run

name: build
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
# Work around https://github.com/actions/checkout/issues/290
- run: git fetch --force --tags
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: vs49688-nix-cache
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- run: |
nix build -L .#ci
- name: Work around https://github.com/actions/upload-artifact/issues/92
run: |
mkdir dist
cp -Rp result/* dist/
- uses: actions/upload-artifact@v3
with:
name: release-artifacts
path: dist/*
build-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
submodules: true
- run: cmake -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=MinSizeRel
- run: cmake --build build
build-macos:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
submodules: true
- run: cmake -B build -DCMAKE_BUILD_TYPE=MinSizeRel
- run: cmake --build build
deploy:
needs:
- build
- build-windows
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: release-artifacts
path: dist
- uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: dist/*