Skip to content

Commit

Permalink
use Cargo.toml & Cargo.lock for sccache build dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Be-ing committed Mar 15, 2021
1 parent 460912a commit f9e1024
Show file tree
Hide file tree
Showing 6 changed files with 3,487 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,29 +104,24 @@ jobs:
name: ${{ matrix.name }}
steps:

# sccache's handling of the /fp:fast MSVC compiler option is broken, so use our fork with the fix.
# https://github.com/mozilla/sccache/issues/950
- name: "Check out repository"
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: "[Windows] Set up cargo cache"
if: runner.os == 'Windows'
uses: actions/cache@v2
id: sccache-build-cache
with:
path: C:\Users\runneradmin\.cargo
# hash of commit to build
key: e12434e4db24ccbe52b83fb6e37afcb94fc8d37b
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

# This needs to be done first because something later messes with $PATH in a way that breaks cargo
# This needs to be done early because something later messes with $PATH in a way that breaks cargo
# by causing it to find link.exe from Git for Windows instead of MSVC.
- name: "[Windows] Build fixed sccache"
shell: bash
if: runner.os == 'Windows' && steps.sccache-build-cache.outputs.cache-hit != 'true'
# TODO: change this to simply `cargo install sccache` after 0.2.16 has been released
run: cargo install --git https://github.com/mozilla/sccache.git --branch master

- name: "Check out repository"
uses: actions/checkout@v2
with:
fetch-depth: 0
run: cargo install --path .

- name: "Set up cmake"
uses: jwlawson/actions-setup-cmake@v1.4
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
src/mixxx.rc.include
src/mixxx.res

target

*.sqlite

*.cfg
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2653,6 +2653,7 @@ set(CPACK_STRIP_FILES ON)
set(CPACK_CREATE_DESKTOP_LINKS "mixxx")

set(CPACK_SOURCE_IGNORE_FILES "\\\\.#;/#;.*~;\\\\.o$")
list(APPEND CPACK_SOURCE_IGNORE_FILES "/target/")
list(APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.git/")
list(APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.github/")
list(APPEND CPACK_SOURCE_IGNORE_FILES "/cache/")
Expand Down
Loading

0 comments on commit f9e1024

Please sign in to comment.