[CI] Ensure apt package index is up-to-date
Installing packages with `apt-get` requires the package index to
up-to-date. If not, the package installation might fail due to packages
being selected for installation which don't exist any more.
In hosted CI runners, this step is automatically taken care of, and
adding an explicit `apt-get update` is a no-op (except for taking a
small amount of time). In other environments, it's essential for
correctness.
Signed-off-by: Philipp Wagner <phw@lowrisc.org>
diff --git a/ci/install-package-dependencies.yml b/ci/install-package-dependencies.yml
index 93b7d27..db05b5c 100644
--- a/ci/install-package-dependencies.yml
+++ b/ci/install-package-dependencies.yml
@@ -24,6 +24,9 @@
cd "${{ parameters.REPO_TOP }}"
+ # Ensure apt package index is up-to-date.
+ sudo apt-get update
+
# NOTE: We use sed to remove all comments from apt-requirements.txt,
# since apt-get doesn't actually provide such a feature.
sed 's/#.*//' apt-requirements.txt \