Skip to content

Commit

Permalink
Merge pull request #14 from Milo123459/update-workflow
Browse files Browse the repository at this point in the history
Update workflows
  • Loading branch information
suptejas authored Apr 23, 2022
2 parents 16c49f2 + 2590707 commit 65d5a82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 33 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,13 @@ jobs:
version: latest
platform: x64


- name: Cache .cargo/bin
uses: actions/cache@v3

env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.cargo/bin
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/cargo.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: Swatinem/rust-cache@v1

- name: Install sccache
run: if [ -e ~/.cargo/bin/sccache ] ; then echo "Sccache is already installed"; else cargo install sccache; fi
run: if [ -e ~/.cargo/bin/sccache ] ; then echo "Sccache is already installed"; else cargo install sccache -f; fi

- name: Install fleet
run: if [ -e ~/.cargo/bin/fleet ] ; then echo "Fleet is already installed"; else cargo install fleet-rs; fi
run: if [ -e ~/.cargo/bin/fleet ] ; then echo "Fleet is already installed"; else cargo install fleet-rs -f; fi

- name: Run app using fleet
run: fleet run --bin fleet
run: fleet build --bin fleet
21 changes: 5 additions & 16 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,13 @@ jobs:
components: clippy
override: true

- name: Cache ~/.cargo/bin
uses: actions/cache@v3

env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.cargo/bin
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/cargo.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: Swatinem/rust-cache@v1

- name: Install sccache
run: if (Test-Path -Path ~\.cargo\bin\sccache.exe -PathType Leaf) {echo "Sccache is already installed"} else { cargo install sccache }
run: if (Test-Path -Path ~\.cargo\bin\sccache.exe -PathType Leaf) {echo "Sccache is already installed"} else { cargo install sccache -f }

- name: Install fleet
run: if (Test-Path -Path ~\.cargo\bin\fleet.exe -PathType Leaf) {echo "Fleet is already installed"} else { cargo install fleet-rs }
run: if (Test-Path -Path ~\.cargo\bin\fleet.exe -PathType Leaf) {echo "Fleet is already installed"} else { cargo install fleet-rs -f }

- name: Run app using fleet
run: fleet run --bin fleet
run: fleet build --bin fleet

0 comments on commit 65d5a82

Please sign in to comment.