Skip to content

Commit

Permalink
Merge pull request #448 from tweag/update_flake_lock_action
Browse files Browse the repository at this point in the history
Use nixos-24.05 instead of nixos-unstable and fix a few issues
  • Loading branch information
mergify[bot] authored Jul 11, 2024
2 parents c1afab1 + 72a8882 commit c7d568c
Show file tree
Hide file tree
Showing 9 changed files with 131 additions and 112 deletions.
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

0 comments on commit c7d568c

Please sign in to comment.