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

Use nixos-24.05 instead of nixos-unstable and fix a few issues #448

Merged
merged 9 commits into from
Jul 11, 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
22 changes: 14 additions & 8 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ jobs:
- true
- false
withNixRemote:
- true
# FIXME: disable nix-remote checks as they don't work
# see https://github.com/tweag/rules_nixpkgs/issues/564
#- true
- false
exclude:
# skip nix remote jobs on MacOS
- os: macos-12
withNixRemote: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -39,7 +45,7 @@ jobs:
with:
buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
- name: Start remote Nix server
if: matrix.withNixRemote && matrix.os == 'ubuntu-latest'
if: matrix.withNixRemote
run: |
# Generate temporary SSH keys.
mkdir -p $HOME/.ssh
Expand All @@ -52,22 +58,22 @@ jobs:
cp .github/nix-server/keys/* $HOME/.ssh/

sudo cp .github/nix-server/config /etc/ssh/ssh_config

echo "Setting BAZEL_NIX_REMOTE env variable"
echo BAZEL_NIX_REMOTE=nix-server >> "$GITHUB_ENV"
- name: Build & test
env:
BZLMOD_ENABLED: ${{ matrix.bzlmodEnabled }}
NIX_REMOTE_ENABLED: matrix.withNixRemote && matrix.os == 'ubuntu-latest'
run: |
if [ "$NIX_REMOTE_ENABLED" = "true" ]; then
echo "Setting BAZEL_NIX_REMOTE env variable"
export BAZEL_NIX_REMOTE=nix-server
fi

nix-shell --pure \
--keep GITHUB_STEP_SUMMARY \
--keep GITHUB_REPOSITORY \
--keep BZLMOD_ENABLED \
--keep BAZEL_NIX_REMOTE \
--run 'bash .github/build-and-test'
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
test-examples:
name: Build & Test - Examples
strategy:
Expand Down
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ load(
)

nixpkgs_package(
name = "nix_2_10",
attribute_path = "nixVersions.nix_2_10",
name = "nix_2_18",
attribute_path = "nixVersions.nix_2_18",
repositories = {"nixpkgs": "@nixpkgs"},
)

Expand Down
38 changes: 19 additions & 19 deletions nix/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nix/flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
Expand Down
4 changes: 3 additions & 1 deletion testing/go-bzlmod/tests/cc-patched.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ let
echo "-F${Security}/Library/Frameworks" >> $out/nix-support/cc-cflags
echo "-F${Foundation}/Library/Frameworks" >> $out/nix-support/cc-cflags
echo "-L${pkgs.llvmPackages.libcxx}/lib" >> $out/nix-support/cc-cflags
echo "-L${pkgs.llvmPackages.libcxxabi}/lib" >> $out/nix-support/cc-cflags
echo "-L${pkgs.libiconv}/lib" >> $out/nix-support/cc-cflags
echo "-L${pkgs.darwin.libobjc}/lib" >> $out/nix-support/cc-cflags
echo "-resource-dir=${pkgs.stdenv.cc}/resource-root" >> $out/nix-support/cc-cflags
'' +
pkgs.lib.optionalString (pkgs.llvmPackages ? libcxxabi) ''
echo "-L${pkgs.llvmPackages.libcxxabi}/lib" >> $out/nix-support/cc-cflags
'';
};
in
Expand Down
Loading