From 8ae25090cf3b86fa367b788542146f59f701aa91 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Fri, 29 May 2020 13:44:17 +0200 Subject: [PATCH] chore: add separate "Linux release" CI job using Nix channel with older glibc for compatibility --- .github/workflows/ci.yml | 13 ++++++++++--- default.nix | 2 +- shell.nix | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b1820ca36..3eb3b4eb14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,18 +18,22 @@ jobs: strategy: matrix: include: - - name: Linux + # portable release build: link most libraries statically and use channel with older glibc (2.27; LLVM 7) + - name: Linux release os: ubuntu-latest CMAKE_OPTIONS: -DSTATIC=ON + shell: nix-shell --arg pkgs "import (fetchTarball \"channel:nixos-19.03\") {{}}" --run "bash -euo pipefail {0}" + - name: Linux + os: ubuntu-latest check-stage3: true test-speedcenter: true - name: Linux Debug os: ubuntu-latest - CMAKE_OPTIONS: -DSTATIC=ON -DCMAKE_BUILD_TYPE=Debug + CMAKE_OPTIONS: -DCMAKE_BUILD_TYPE=Debug - name: Linux fsanitize os: ubuntu-latest # turn off custom allocator to make LSAN do its magic - CMAKE_OPTIONS: -DSTATIC=ON -DLEAN_EXTRA_CXX_FLAGS=-fsanitize=address,undefined -DLEANC_EXTRA_FLAGS=-fsanitize=address,undefined -DSMALL_ALLOCATOR=OFF + CMAKE_OPTIONS: -DLEAN_EXTRA_CXX_FLAGS=-fsanitize=address,undefined -DLEANC_EXTRA_FLAGS=-fsanitize=address,undefined -DSMALL_ALLOCATOR=OFF - name: macOS os: macos-latest CMAKE_OPTIONS: -DSTATIC=ON @@ -80,6 +84,9 @@ jobs: cd build cmake .. ${{ matrix.CMAKE_OPTIONS }} make -j4 + - name: Patch + run: patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 --remove-rpath build/stage0.5/bin/lean + if: matrix.name == 'Linux release' - name: Pack run: cd build/stage0.5; cpack - uses: actions/upload-artifact@v2 diff --git a/default.nix b/default.nix index b0db9cc30d..c0e151a7ca 100644 --- a/default.nix +++ b/default.nix @@ -1,3 +1,3 @@ -{ pkgs ? import ./nix/nixpkgs.nix, llvmPackages ? pkgs.llvmPackages_10 }: +{ pkgs ? import ./nix/nixpkgs.nix, llvmPackages ? pkgs.llvmPackages_latest }: pkgs.callPackage ./nix/derivation.nix { inherit llvmPackages; } diff --git a/shell.nix b/shell.nix index b2d94253b3..437cb973b2 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ -{ pkgs ? import ./nix/nixpkgs.nix, llvmPackages ?pkgs.llvmPackages_10 } @ args: +{ pkgs ? import ./nix/nixpkgs.nix, llvmPackages ? pkgs.llvmPackages_latest } @ args: let attribs = rec { lean = import ./default.nix args;