diff options
| author | MatthieuCoder <matthieu@matthieu-dev.xyz> | 2023-01-04 19:39:02 +0400 |
|---|---|---|
| committer | MatthieuCoder <matthieu@matthieu-dev.xyz> | 2023-01-04 19:39:02 +0400 |
| commit | e3fa0691ed109049ac5a4c7375f2f2e85bae75d1 (patch) | |
| tree | d7db5fde883da7f2af3063cb95a77c50d77b20b6 | |
| parent | 408b524ba7d7c2b8b34131054d9f2498cc0d62ff (diff) | |
move cache before build (i'm stpid)
| -rw-r--r-- | .github/workflows/build.yml | 53 |
1 files changed, 28 insertions, 25 deletions
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') }} |
