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 - name: Install Rust
uses: https://github.com/dtolnay/rust-toolchain@stable 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 - name: Build for Linux
run: cargo build --release run: cargo build --release
@ -26,24 +37,24 @@ jobs:
name: linux-binary name: linux-binary
path: target/release/filesorters path: target/release/filesorters
build-windows: # build-windows:
name: Build for Windows # name: Build for Windows
runs-on: ubuntu-latest-root # runs-on: ubuntu-latest-root
#
steps: # steps:
- uses: actions/checkout@v4 # - uses: actions/checkout@v4
#
- name: Install Rust # - name: Install Rust
uses: https://github.com/dtolnay/rust-toolchain@stable # uses: https://github.com/dtolnay/rust-toolchain@stable
#
- name: Install cross # - name: Install cross
run: cargo install cross # run: cargo install cross
#
- name: Build for Windows # - name: Build for Windows
run: cross build --release --target x86_64-pc-windows-gnu # run: cross build --release --target x86_64-pc-windows-gnu
#
- name: Upload Windows artifact # - name: Upload Windows artifact
uses: forgejo/upload-artifact@v4 # uses: forgejo/upload-artifact@v4
with: # with:
name: windows-binary # name: windows-binary
path: target/x86_64-pc-windows-gnu/release/filesorters.exe # path: target/x86_64-pc-windows-gnu/release/filesorters.exe