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 Aug 12, 2023
1 parent 854684e commit a16754c
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 @@ -44,10 +44,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 @@ -65,6 +82,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 @@ -76,7 +106,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 @@ -96,7 +126,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 a16754c

Please sign in to comment.