ci: add caching
All checks were successful
Build and Upload filesorters Binaries / Build for Linux (push) Successful in 2m52s

This commit is contained in:
Vladimir Rubin 2024-12-30 17:53:25 +02:00
parent fe1ecb0817
commit 2fed2c8223
Signed by: vavakado
GPG key ID: CAB744727F36B524

View file

@ -17,6 +17,17 @@ jobs:
- name: Install Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build for Linux
run: cargo build --release
@ -26,24 +37,24 @@ jobs:
name: linux-binary
path: target/release/filesorters
build-windows:
name: Build for Windows
runs-on: ubuntu-latest-root
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
- name: Install cross
run: cargo install cross
- name: Build for Windows
run: cross build --release --target x86_64-pc-windows-gnu
- name: Upload Windows artifact
uses: forgejo/upload-artifact@v4
with:
name: windows-binary
path: target/x86_64-pc-windows-gnu/release/filesorters.exe
# build-windows:
# name: Build for Windows
# runs-on: ubuntu-latest-root
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Install Rust
# uses: https://github.com/dtolnay/rust-toolchain@stable
#
# - name: Install cross
# run: cargo install cross
#
# - name: Build for Windows
# run: cross build --release --target x86_64-pc-windows-gnu
#
# - name: Upload Windows artifact
# uses: forgejo/upload-artifact@v4
# with:
# name: windows-binary
# path: target/x86_64-pc-windows-gnu/release/filesorters.exe