From 7904ba4c8da6ecf6b4aacefddcf6bef3d49aca7d Mon Sep 17 00:00:00 2001 From: "Spencer C. Imbleau (he/him)" Date: Sat, 13 Aug 2022 20:03:00 -0400 Subject: [PATCH] Cache correction (#17) README, Workflow separation, various bugfixes and cache correction Co-authored-by: Sebastian J. Hamel --- .github/workflows/build.yml | 36 ++++++++++++------------------------ .github/workflows/test.yml | 4 +--- 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62daa25..3a3e4eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,72 +10,62 @@ jobs: build-windows: runs-on: windows-latest steps: + - name: Checkout code + uses: actions/checkout@v3 - name: Pull build cache id: cache-build uses: actions/cache@v3 with: path: ./target key: windows-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('./src') }}-${{ hashFiles('./launchers') }} - - name: Checkout code - if: steps.cache-build.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - name: Build if: steps.cache-build.outputs.cache-hit != 'true' - run: | - cd ./launchers/native - cargo build + run: cargo build build-mac: runs-on: macos-latest steps: + - name: Checkout code + uses: actions/checkout@v3 - name: Pull build cache id: cache-build uses: actions/cache@v3 with: path: ./target key: mac-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('./src') }}-${{ hashFiles('./launchers') }} - - name: Checkout code - if: steps.cache-build.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - name: Build if: steps.cache-build.outputs.cache-hit != 'true' - run: | - cd ./launchers/native - cargo build + run: cargo build build-ubuntu: runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v3 - name: Pull build cache id: cache-build uses: actions/cache@v3 with: path: ./target key: ubuntu-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('./src') }}-${{ hashFiles('./launchers') }} - - name: Checkout code - if: steps.cache-build.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - name: Get dependencies if: steps.cache-build.outputs.cache-hit != 'true' run: sudo apt install libasound2-dev libudev-dev pkg-config - name: Build if: steps.cache-build.outputs.cache-hit != 'true' - run: | - cd ./launchers/native - cargo build + run: cargo build build-wasm: runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v3 - name: Pull build cache id: cache-build uses: actions/cache@v3 with: path: ./launchers/wasm/dist key: wasm-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('./src') }}-${{ hashFiles('./launchers') }} - - name: Checkout code - if: steps.cache-build.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - name: Install Trunk if: steps.cache-build.outputs.cache-hit != 'true' uses: jetli/trunk-action@v0.1.0 @@ -83,6 +73,4 @@ jobs: version: "latest" - name: Trunk Build if: steps.cache-build.outputs.cache-hit != 'true' - run: | - cd ./launchers/wasm - trunk build + run: trunk build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f34a053..e8758f9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,10 +14,8 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - # Install dependencies - name: Install dependencies - run: | - sudo apt install libasound2-dev libudev-dev pkg-config + run: sudo apt install libasound2-dev libudev-dev pkg-config # Unit testing - name: Test