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

Nix updates 2.3 #3258

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ab6916d
Updates to nix files
poelzi Oct 22, 2020
6c2b940
Enable nix derivates on travis
poelzi Oct 22, 2020
598ee75
Change to Build directory before copying cache
poelzi Nov 3, 2020
8eea270
Add colored output if no QT_MESSAGE_PATTERN is set
poelzi Nov 5, 2020
21efdea
Add cachix signing key to .travis.yml.
rryan Nov 1, 2020
886d866
Fix wrong wrapper searchpath
poelzi Nov 6, 2020
d0c4489
add srom / pre-commit dependency
poelzi Nov 6, 2020
8af1682
Use system pre-commit if version is gt 2.0
poelzi Nov 6, 2020
e4326d5
Add workaround for wrapQtApp wrapper invocation
poelzi Nov 7, 2020
a03366d
Add nixfmt in development shell
poelzi Nov 7, 2020
76143b4
Add faad & nix to dependencies
poelzi Nov 11, 2020
5f069f0
fix faad loading path
poelzi Nov 13, 2020
5cbd7d7
Warn user on older llvm versions about optimization
poelzi Nov 14, 2020
848f539
Add support for clang & clazy
poelzi Nov 14, 2020
1822cb3
simplify travis
poelzi Nov 14, 2020
983b137
Use CI clazy parameters if not set
poelzi Nov 14, 2020
dedf8aa
Add workaround for fast-math bugs
poelzi Nov 17, 2020
b639b22
Use Github Actions for nix dev build
poelzi Nov 18, 2020
f1a6258
add caching to github actions nix dev build
poelzi Nov 18, 2020
7033752
cache nix packages
poelzi Nov 18, 2020
d8c1359
pass mixxx-test arguments from wrapper
poelzi Nov 19, 2020
f5da3ba
[nix] Create includes folder for IDEs
poelzi Nov 23, 2020
8d84f77
Create compiler commands to help ides
poelzi Nov 24, 2020
1f9e356
Set QT platform env in test run if not set
poelzi Nov 24, 2020
ba0cf23
Updates to github workflows
poelzi Nov 24, 2020
592f0b5
update clazy to 1.8
poelzi Nov 27, 2020
1f3fc3d
Link compiler used into cbuild folder
poelzi Nov 28, 2020
56ae1a1
use clazy only with argument
poelzi Dec 7, 2020
f71330b
add include-what-you-use in dev shell
poelzi Dec 7, 2020
51eb893
use clazy in ci
poelzi Dec 7, 2020
39efd9f
Remove pip pre-commit. Allow setting build folder, allow setting qt d…
poelzi Jan 11, 2021
7e84eb3
Merge branch '2.3' of https://github.com/mixxxdj/mixxx into nix-updat…
poelzi Jan 11, 2021
5f1fce7
Remove accidental macos change
poelzi Jan 11, 2021
a8623a4
Rename build directory from cbuild to build
poelzi Jan 11, 2021
985250a
reduce number of nix builds
poelzi Apr 12, 2021
e0357ca
nix updates:
poelzi Apr 12, 2021
f2e6ca1
Merge branch '2.3' of https://github.com/mixxxdj/mixxx into nix-updat…
poelzi Apr 12, 2021
1dbf7ef
only ignore results in root directory
poelzi Apr 12, 2021
0072448
Use option for FAST_MATH
poelzi Apr 12, 2021
86446c1
quote string in CMakeLists
poelzi Apr 12, 2021
f043767
fix nix workflow file
poelzi Apr 12, 2021
03d058e
update djinterop. prevent downloads while building
poelzi Apr 15, 2021
364e966
lookup mixxx source path when configuring, not when entering the nix-…
poelzi Apr 15, 2021
694b74e
Suggest user to use gcc in case of fastmath bug
poelzi Apr 18, 2021
6b256b2
use gcc as default compiler due fp rounding bug
poelzi Apr 18, 2021
179883d
force link against ffmpeg version 4
poelzi Apr 18, 2021
ae580f0
remove leftovers from python based pre-commit hook. Remove old colors
poelzi May 11, 2021
51accb5
Merge branch '2.3' of https://github.com/mixxxdj/mixxx into nix-updat…
poelzi May 11, 2021
9b12727
nix: extract version from CMakeLists instead of version.h
poelzi May 12, 2021
9fd7779
use absolute ccache path name. update to v2 cache
poelzi May 12, 2021
c702a88
allow nix builds to fail
poelzi May 12, 2021
7c1045f
fix empty lv2 plugin list
poelzi Jun 28, 2021
69a5a8b
fix build with 21.05
poelzi Jun 28, 2021
d339e2a
Merge branch '2.3' of https://github.com/mixxxdj/mixxx into nix-updat…
poelzi Jun 28, 2021
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
1 change: 1 addition & 0 deletions .codespellignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Crate
crate
InOut
copyable
sord
68 changes: 68 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "NixOS Builds"
on:
pull_request:
push:
jobs:
dev:
strategy:
matrix:
include:
- name: nixos-20.09-gcc
os: nixos-20.09
use_clang: false
use_clazy: false
ccache: ccache-gcc
name: "nix-shell ${{ matrix.name }}"
runs-on: ubuntu-latest
steps:
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ matrix.os }}-${{ matrix.ccache }}-${{ github.head_ref }}-${{ github.run_number }}
restore-keys: |
${{ matrix.os }}-${{ matrix.ccache }}-${{ github.head_ref }}
${{ matrix.os }}-${{ matrix.ccache }}-
- name: cache nix store
uses: actions/cache@v2
with:
path: /nix/store
key: ${{ matrix.os }}-nix-${{ github.head_ref }}-${{ github.run_number }}
restore-keys: |
${{ matrix.os }}-nix-${{ github.head_ref }}
${{ matrix.os }}-nix-
- uses: actions/checkout@v2.3.4
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:${{ matrix.os }}
- run: |
nix-shell --arg enableKeyfinder true --arg useClang ${{ matrix.use_clang }} \
--arg useClazy ${{ matrix.use_clazy }} --arg defaultLv2Plugins true \
--command "configure && build && run-tests"
pkg:
strategy:
matrix:
include:
- name: nixos-20.09
os: nixos-20.09
name: "nix-build"
runs-on: ubuntu-latest
steps:
- name: cache nix store
uses: actions/cache@v1.1.0
with:
path: /nix/store
key: ${{ matrix.os }}-nix-${{ github.head_ref }}-${{ github.run_number }}
restore-keys: |
${{ matrix.os }}-nix-${{ github.head_ref }}
${{ matrix.os }}-nix-
- uses: actions/checkout@v2.3.4
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:${{ matrix.os }}
- run: |
if [ -n "$CACHIX_SIGNING_KEY" ]; then
nix-build shell.nix --arg releaseMode true --arg defaultLv2Plugins true | cachix push mixxx;
else
nix-build shell.nix --arg releaseMode true --arg defaultLv2Plugins true
fi
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ compile_commands.json
# Exclude buildenv directory from our helper scripts
/buildenv/

# Ignore nix-build result links
/result*

# CMake build configurations, generated by tools/windows_buildenv.bat
CMakeSettings.json

Expand Down
20 changes: 18 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# using regular Clang or AppleClang
set(LLVM_CLANG true)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0.0" AND
CMAKE_SYSTEM_NAME STREQUAL "Linux")
message(WARNING "Found LLVM < 10 which has known optimization bugs with \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please name the glibc version. The issue starts with glibc-2.31
bminor/glibc@7bdb921

On Ubuntu we have not issue because Ubuntu Bionic uses glibc-2.27 and LVVM 9
Ubuntu Focal has 2.31 but also LVVM 10.

certain glibc versions. In case your build fails with linking errors. \
Use try using gcc if possible. Pass -DFAST_MATH=off to allow compilation
to a slow binary. See https://bugs.llvm.org/show_bug.cgi?id=45034")
endif()
else()
set(LLVM_CLANG false)
endif()
Expand Down Expand Up @@ -95,9 +102,13 @@ endif()
#
# Optimizations
#

set(OPTIMIZE "portable" CACHE STRING "Optimization and Tuning (set to off, portable, native, legacy)")
string(TOLOWER "${OPTIMIZE}" OPTIMIZE)

# certain combinations of llvm and glibc cause problems with fastmath at link time. Add option to disable
# fast-math but still allow other optimizations
option(FAST_MATH "Use -fast-math optimization. Only disable this when linking fails with LLVM/GCC." ON)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this option still required? It is an not recommended experimental thing anyway producing a not usable Mixxx. The user can just comment out the -ffast-math flag below if he really wants.

If we like to keep it, we need here a warning in the property description, that setting this to off is not recommended.
This will then be available in the cmake GUI.

This is NOT the recommended solution for the linker issue. Please improve the comment accordingly.


message(STATUS "Optimization level: ${OPTIMIZE}")

# CMAKE_INTERPROCEDURAL_OPTIMIZATION can be defined to override the default behaviour.
Expand Down Expand Up @@ -244,9 +255,14 @@ elseif(GNU_GCC OR LLVM_CLANG)
# faster, measured on a Atom CPU.
add_compile_options(
-O3
-ffast-math
-funroll-loops
)
if(FAST_MATH)
add_compile_options(
-ffast-math
)
endif()

# set -fomit-frame-pointer when we don't profile and are not using
# Clang sanitizers.
# Note: It is only included in -O on machines where it does not
Expand Down
124 changes: 0 additions & 124 deletions default.nix

This file was deleted.

Loading