Skip to content

Commit

Permalink
fix: macos build
Browse files Browse the repository at this point in the history
  • Loading branch information
hanabi1224 committed Oct 20, 2022
1 parent 8764554 commit 999a06c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 26 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ jobs:
- name: Install Dependencies
run: sudo make install-deps
- name: Setup sccache
uses: hanabi1224/sccache-action@9a6eaffba482beb3b919ce68d12f2559b4db12b3
uses: hanabi1224/sccache-action@6e1e19ee4f8c1a2efec1f23a41dd2f9b75c7ee84
with:
cache-key: ${{ runner.os }}-sccache-codecov-${{ hashFiles('rust-toolchain.toml') }}
# cache-save: ${{ github.event_name != 'pull_request' }}
- name: Run cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# Fail action on broken links
fail: true
- name: Setup sccache
uses: hanabi1224/sccache-action@9a6eaffba482beb3b919ce68d12f2559b4db12b3
uses: hanabi1224/sccache-action@6e1e19ee4f8c1a2efec1f23a41dd2f9b75c7ee84
with:
cache-key: ${{ runner.os }}-sccache-${{ hashFiles('rust-toolchain.toml') }}
cache-save: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
include:
- os: ubuntu-latest
file: forest-${{ github.ref_name }}-linux-amd64.zip
- os: macos-latest
- os: macos-12
file: forest-${{ github.ref_name }}-macos-amd64.zip
steps:
- name: Checkout Sources
Expand Down
44 changes: 21 additions & 23 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Checkout Sources
uses: actions/checkout@v3
- name: Setup sccache
uses: hanabi1224/sccache-action@9a6eaffba482beb3b919ce68d12f2559b4db12b3
uses: hanabi1224/sccache-action@6e1e19ee4f8c1a2efec1f23a41dd2f9b75c7ee84
with:
# reuse build cache from calibnet sync check which is built with release profile
cache-key: ${{ runner.os }}-sccache-test-${{ hashFiles('rust-toolchain.toml') }}
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Apt Dependencies
run: sudo make install-deps
- name: Setup sccache
uses: hanabi1224/sccache-action@9a6eaffba482beb3b919ce68d12f2559b4db12b3
uses: hanabi1224/sccache-action@6e1e19ee4f8c1a2efec1f23a41dd2f9b75c7ee84
with:
cache-key: ${{ runner.os }}-sccache-${{ hashFiles('rust-toolchain.toml') }}
cache-save: false
Expand All @@ -70,12 +70,14 @@ jobs:
steps:
- name: Checkout Sources
uses: actions/checkout@v3
- name: Rust Cache
uses: Swatinem/rust-cache@v2
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}
continue-on-error: true
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
key: ${{ runner.os }}-audit-cargo-bin-${{ hashFiles('rust-toolchain.toml') }}
- name: Install Audit
run: cargo install cargo-audit
continue-on-error: true
- name: Run Audit
run: make audit

Expand All @@ -86,7 +88,7 @@ jobs:
- name: Checkout Sources
uses: actions/checkout@v3
- name: Setup sccache
uses: hanabi1224/sccache-action@9a6eaffba482beb3b919ce68d12f2559b4db12b3
uses: hanabi1224/sccache-action@6e1e19ee4f8c1a2efec1f23a41dd2f9b75c7ee84
with:
cache-key: ${{ runner.os }}-sccache-${{ hashFiles('rust-toolchain.toml') }}
cache-save: false
Expand All @@ -110,12 +112,14 @@ jobs:
steps:
- name: Checkout Sources
uses: actions/checkout@v3
- name: Rust Cache
uses: Swatinem/rust-cache@v2
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}
continue-on-error: true
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
key: ${{ runner.os }}-spellcheck-cargo-bin-${{ hashFiles('rust-toolchain.toml') }}
- name: Install spellcheck
run: cargo install cargo-spellcheck
continue-on-error: true
- name: Run Spellcheck
run: make spellcheck

Expand All @@ -124,22 +128,15 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-12]
steps:
- name: Checkout Sources
uses: actions/checkout@v3
- name: Setup sccache Linux
uses: hanabi1224/sccache-action@9a6eaffba482beb3b919ce68d12f2559b4db12b3
if: startsWith(matrix.os, 'Ubuntu')
with:
arch: x86_64-unknown-linux-musl
cache-key: ${{ runner.os }}-sccache-${{ hashFiles('rust-toolchain.toml') }}
- name: Setup sccache MACOS
uses: hanabi1224/sccache-action@9a6eaffba482beb3b919ce68d12f2559b4db12b3
if: startsWith(matrix.os, 'macOS')
- name: Setup sccache
uses: hanabi1224/sccache-action@6e1e19ee4f8c1a2efec1f23a41dd2f9b75c7ee84
with:
arch: x86_64-apple-darwin
cache-key: ${{ runner.os }}-sccache-${{ hashFiles('rust-toolchain.toml') }}
# cache-save: ${{ github.event_name != 'pull_request' }}
- name: Install Linux Dependencies
if: startsWith(matrix.os, 'Ubuntu')
run: |
Expand Down Expand Up @@ -169,9 +166,10 @@ jobs:
- name: Install Dependencies
run: sudo make install-deps
- name: Setup sccache
uses: hanabi1224/sccache-action@9a6eaffba482beb3b919ce68d12f2559b4db12b3
uses: hanabi1224/sccache-action@6e1e19ee4f8c1a2efec1f23a41dd2f9b75c7ee84
with:
cache-key: ${{ runner.os }}-sccache-test-${{ hashFiles('rust-toolchain.toml') }}
# cache-save: ${{ github.event_name != 'pull_request' }}
- name: build and install binaries
run: make install
env:
Expand Down

0 comments on commit 999a06c

Please sign in to comment.