Skip to content

Commit

Permalink
CI: drop deprecated ubuntu-18.04
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Nov 14, 2024
1 parent 6949168 commit d0b570b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- if: startsWith(matrix.os, 'ubuntu')
name: lxd should be installed
run: "/snap/bin/lxd version"
- name: Snapcraft should not be installed
shell: bash
run: "! snapcraft --version"
Expand Down Expand Up @@ -67,22 +70,3 @@ jobs:
run: |
snap info snapcraft
grep -Eq 'tracking:\s+latest/candidate' <(snap info snapcraft)
# Install with lxd
lxd:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-18.04]
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- if: matrix.os == 'ubuntu-18.04'
name: lxd should not be available
run: "! /snap/bin/lxd waitready"
- name: Run action
uses: ./
with:
use_lxd: ${{ matrix.os == 'ubuntu-18.04' }}
- name: lxd should be installed
run: "/snap/bin/lxd version"
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

This action…

- Installs Snapcraft on Ubuntu 18.04+/macOS
- Installs Snapcraft on Ubuntu/macOS
- Optionally logs you in to the Snap Store
- Allows you to run Snapcraft commands in your GitHub Actions workflows

Expand Down Expand Up @@ -86,13 +86,11 @@ Finally, add the following option to your workflow step:
### Build using LXD
Using `runs-on: ubuntu-20.04` or later, LXD is availabe by default. If using `runs-on: ubuntu-18.04`, LXD can be installed as shown below. This is an alternative to using `multipass` (GitHub VMs give the error `launch failed: CPU does not support KVM extensions.` when trying to use `multipass`).
Using `runs-on: ubuntu-20.04` or later, LXD is availabe by default.

```yml
- name: Install Snapcraft with LXD
uses: samuelmeuli/action-snapcraft@v3
with:
use_lxd: ${{ matrix.os == 'ubuntu-18.04' }}
- name: Build snap
run: sg lxd -c 'snapcraft --use-lxd'
```
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ inputs:
description: Skip installation (login only)
required: false
use_lxd:
description: Whether to install and configure lxd (ubuntu18.04 or lower only)
description: Whether to install and configure lxd
required: false
# tag: deprecate_use_lxd
deprecationMessage: On ubuntu20.04 or later, it's enabled by default
deprecationMessage: automatic on ubuntu-20.04 or later

runs:
using: node20
Expand Down

0 comments on commit d0b570b

Please sign in to comment.