Skip to content

Commit

Permalink
ci: Update actions and try to use cache again
Browse files Browse the repository at this point in the history
  • Loading branch information
marhkb committed Jun 9, 2023
1 parent fed72f7 commit fb5a7ee
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,27 @@ jobs:
name: Clippy
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-43
image: bilelmoussaoui/flatpak-github-actions:gnome-44
options: --privileged
steps:
- uses: actions/checkout@v3

- name: Cache flatpak
id: cache-flatpak
uses: actions/cache@v3
with:
path: .flatpak-builder
key: ${{ runner.os }}-flatpak-${{ hashFiles('build-aux/com.github.marhkb.Pods.Devel.json') }}
restore-keys: ${{ runner.os }}-flatpak-

- name: Cache cargo
id: cache-cargo
uses: actions/cache@v3
with:
path: /github/home/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Create dummy versions of configured file
run: |
sed \
Expand All @@ -58,6 +75,19 @@ jobs:
--stop-at=pods \
flatpak_app build-aux/com.github.marhkb.Pods.Devel.json
- name: Retrieve rustc version
id: rustc-version
run: |
echo "RUSTC_VERSION=$(flatpak-builder --run flatpak_app build-aux/com.github.marhkb.Pods.Devel.json rustc -- -V)" >> $GITHUB_OUTPUT
- name: Cache target
id: cache-target
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-target-${{ steps.rustc-version.outputs.RUSTC_VERSION }}-${{ hashFiles('Cargo.lock') }}
restore-keys: ${{ runner.os }}-target-

- name: Run clippy
run: |
flatpak-builder \
Expand All @@ -69,7 +99,7 @@ jobs:
name: Flatpak
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-43
image: bilelmoussaoui/flatpak-github-actions:gnome-44
options: --privileged
strategy:
matrix:
Expand All @@ -89,7 +119,7 @@ jobs:
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v5
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6
with:
bundle: pods.flatpak
manifest-path: build-aux/com.github.marhkb.Pods.Devel.json
Expand Down

0 comments on commit fb5a7ee

Please sign in to comment.