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

Build default devShell in CI for linux/macos #1683

Merged
merged 1 commit into from
Oct 4, 2024
Merged
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
28 changes: 18 additions & 10 deletions .github/workflows/binaries.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build distributable executables for hydra
name: Binaries
# Build distributable executables and prime nix caches with development shells.
name: Binaries & devShells

on:
push:
Expand All @@ -10,10 +10,8 @@ on:
- "*.*.*"

jobs:
# Produces static ELF binary for using MuslC which includes all needed
# libraries statically linked into it.
build-executables-linux:
name: "Build x86_64-linux static executables"
build-linux:
name: "Build for x86_64-linux"
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
Expand Down Expand Up @@ -43,6 +41,8 @@ jobs:
echo "VERSION=$(git describe --always HEAD)" | tee "$GITHUB_ENV"
- name: ❄ Build static executables
# Produces static ELF binary for using MuslC which includes all needed
# libraries statically linked into it.
run: |
nix build .#release-static
# XXX: Why unzip https://github.com/actions/upload-artifact/issues/39
Expand All @@ -54,10 +54,12 @@ jobs:
name: hydra-x86_64-linux-${{ env.VERSION }} # automatically zips
path: out/*

# Produces a dynamic Mach-O binary which is still dynamically linked against
# system dependencies, but all third-party libraries are statically linked.
build-executables-macos:
name: "Build aarch64-darwin dynamic executables"
- name: ❄ Build devShells (for cache)
run: |
nix build .#devShells.default
build-macos:
name: "Build for aarch64-darwin"
runs-on: macos-latest
steps:
- name: 📥 Checkout repository
Expand Down Expand Up @@ -87,6 +89,8 @@ jobs:
echo "VERSION=$(git describe --always HEAD)" | tee "$GITHUB_ENV"
- name: ❄ Build executables
# Produces a dynamic Mach-O binary which is still dynamically linked against
# system dependencies, but all third-party libraries are statically linked.
run: |
nix build .#release
# XXX: Why unzip https://github.com/actions/upload-artifact/issues/39
Expand All @@ -97,3 +101,7 @@ jobs:
with:
name: hydra-aarch64-darwin-${{ env.VERSION }} # automatically zips
path: out/*

- name: ❄ Build devShells (for cache)
run: |
nix build .#devShells.default