Skip to content

Commit

Permalink
ci: try to fix ubuntu 22.04+jammy
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Aug 15, 2024
1 parent 9728459 commit b439095
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,28 @@ jobs:
run: |
sudo apt update
sudo apt install -y python3-pip python3-setuptools python3-wheel python3-venv libapt-pkg-dev
- name: Install external dependencies with homebrew
- name: Install skopeo (mac)
# This is only necessary for Linux until skopeo >= 1.11 is in repos.
# Once we're running on Noble, we can get skopeo from apt.
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
if: ${{ runner.os == 'macOS' }}
run: |
if [[ $(uname --kernel-name) == "Linux" ]]; then
brew install skopeo
- name: Install skopeo (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
if [[ $(cat /etc/os-release | grep VERSION_CODENAME) == 'VERSION_CODENAME=jammy' ]]; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install skopeo
sudo rm -f /bin/skopeo
sudo ln -s $(which skopeo) /bin/skopeo
else
sudo apt install skopeo
fi
brew install skopeo
# Allow skopeo to access the contents of /run/containers
sudo chmod 777 /run/containers
# Add an xdg runtime dir for skopeo to look into for an auth.json file
sudo mkdir -p /run/user/$(id -u)
sudo chown $USER /run/user/$(id -u)
- name: Configure environment
run: |
pipx install tox
Expand All @@ -97,14 +110,6 @@ jobs:
shell: bash
run: |
if [[ $(uname --kernel-name) == "Linux" ]]; then
# Ensure the version of skopeo comes from homebrew
# This is only necessary until we move to noble.
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# Allow skopeo to access the contents of /run/containers
sudo chmod 777 /run/containers
# Add an xdg runtime dir for skopeo to look into for an auth.json file
sudo mkdir -p /run/user/$(id -u)
sudo chown $USER /run/user/$(id -u)
export XDG_RUNTIME_DIR=/run/user/$(id -u)
fi
tox run --skip-pkg-install --no-list-dependencies --result-json results/tox-${{ matrix.platform }}.json --colored yes -m tests
Expand Down

0 comments on commit b439095

Please sign in to comment.