Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve nix ci #14

Merged
merged 3 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:

build:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -49,7 +49,21 @@ jobs:
- name: Build
run: go generate

build-nix:
build-macos-nix:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- uses: DeterminateSystems/nix-installer-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Build
run: nix build

build-linux-nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -64,4 +78,7 @@ jobs:
run: nix flake check

- name: Build
run: nix build
run: |
nix build
# non-flake build
nix-build
4 changes: 4 additions & 0 deletions twenty-twenty-twenty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ buildGoModule {
darwin.apple_sdk_11_0.frameworks.UserNotifications
];

preBuild = lib.optionalString stdenv.isDarwin ''
export MACOSX_DEPLOYMENT_TARGET=11.0
'';

# Tests are mostly useful for development, not to ensure that
# program is running correctly.
doCheck = false;
Expand Down