From: MatthieuCoder Date: Wed, 4 Jan 2023 15:39:02 +0000 (+0400) Subject: move cache before build (i'm stpid) X-Git-Tag: v0.1~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=e3fa0691ed109049ac5a4c7375f2f2e85bae75d1;p=matthieu%2Fnova.git move cache before build (i'm stpid) --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aaa42bc..90f5cde 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,6 +40,15 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - uses: arduino/setup-protoc@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} @@ -74,15 +83,7 @@ jobs: with: name: macos path: artifacts/* - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + build_windows: name: 'Build for Windows' @@ -94,10 +95,20 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - uses: msys2/setup-msys2@v2 with: install: git mingw-w64-x86_64-go mingw-w64-x86_64-make mingw-w64-x86_64-protobuf mingw-w64-x86_64-rust mingw-w64-x86_64-gcc mingw-w64-x86_64-dlfcn - + - name: Build run: | cargo build --release @@ -120,6 +131,13 @@ jobs: with: name: windows path: artifacts/* + + build_linux: + name: 'Build for Linux' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 - uses: actions/cache@v3 with: path: | @@ -130,12 +148,6 @@ jobs: target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - build_linux: - name: 'Build for Linux' - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - uses: arduino/setup-protoc@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} @@ -167,12 +179,3 @@ jobs: with: name: linux_glibc path: artifacts/* - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}