Skip to content

Commit d357396

Browse files
committed
Install Debian package dependencies in Linux GitHub Actions runner
On Linux, Arduino IDE has a transitive dependency on several Debian packages: - libsecret-1-dev - libx11-dev - libxkbfile-dev These packages were preinstalled in previous Linux GitHub Actions runner machine images, and so the workflows that install the Arduino IDE dependencies did not have any provision for installation of the packages. However, the packages were not included in the "ubuntu-24.04" image. The "ubuntu-latest" runner used by the repository's GitHub Actions workflows was recently updated to use the "ubuntu-24.04" image. This caused the dependencies installation to fail: ``` Package libsecret-1 was not found in the pkg-config search path. Perhaps you should add the directory containing `libsecret-1.pc' to the PKG_CONFIG_PATH environment variable Package 'libsecret-1', required by 'virtual:world', not found gyp: Call to 'pkg-config --cflags libsecret-1' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/home/runner/work/arduino-ide/arduino-ide/node_modules/node-gyp/lib/configure.js:325:16) gyp ERR! stack at ChildProcess.emit (node:events:514:28) gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12) gyp ERR! System Linux 6.8.0-1021-azure gyp ERR! command "/opt/hostedtoolcache/node/18.17.1/x64/bin/node" "/home/runner/work/arduino-ide/arduino-ide/node_modules/.bin/node-gyp" "rebuild" gyp ERR! cwd /home/runner/work/arduino-ide/arduino-ide/node_modules/keytar gyp ERR! node -v v18.17.1 gyp ERR! node-gyp -v v9.4.0 gyp ERR! not ok ``` ``` Package x11 was not found in the pkg-config search path. Perhaps you should add the directory containing `x11.pc' to the PKG_CONFIG_PATH environment variable Package 'x11', required by 'virtual:world', not found Package 'xkbfile', required by 'virtual:world', not found Package x11 was not found in the pkg-config search path. Perhaps you should add the directory containing `x11.pc' to the PKG_CONFIG_PATH environment variable Package 'x11', required by 'virtual:world', not found Package 'xkbfile', required by 'virtual:world', not found gyp: Call to '${PKG_CONFIG:-pkg-config} x11 xkbfile --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/home/runner/work/arduino-ide/arduino-ide/node_modules/node-gyp/lib/configure.js:325:16) gyp ERR! stack at ChildProcess.emit (node:events:514:28) gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12) gyp ERR! System Linux 6.8.0-1021-azure gyp ERR! command "/opt/hostedtoolcache/node/18.17.1/x64/bin/node" "/home/runner/work/arduino-ide/arduino-ide/node_modules/.bin/node-gyp" "rebuild" gyp ERR! cwd /home/runner/work/arduino-ide/arduino-ide/node_modules/native-keymap gyp ERR! node -v v18.17.1 gyp ERR! node-gyp -v v9.4.0 gyp ERR! not ok ``` The failure is fixed by configuring the relevant workflows to explicitly install the Debian package dependencies in the Linux runner machine.
1 parent 6eef09e commit d357396

File tree

6 files changed

+48
-4
lines changed

6 files changed

+48
-4
lines changed

.github/workflows/check-i18n-task.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,14 @@ jobs:
7777
version: 3.x
7878

7979
- name: Install dependencies
80-
run: yarn install --immutable
80+
run: |
81+
sudo apt-get \
82+
--yes \
83+
install \
84+
libsecret-1-dev \
85+
libx11-dev \
86+
libxkbfile-dev
87+
yarn install --immutable
8188
env:
8289
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8390

.github/workflows/check-javascript.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ jobs:
7979
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
8080
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8181
run: |
82+
sudo apt-get \
83+
--yes \
84+
install \
85+
libsecret-1-dev \
86+
libx11-dev \
87+
libxkbfile-dev
8288
yarn install
8389
8490
- name: Lint

.github/workflows/i18n-nightly-push.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ jobs:
3535
version: 3.x
3636

3737
- name: Install dependencies
38-
run: yarn install --immutable
38+
run: |
39+
sudo apt-get \
40+
--yes \
41+
install \
42+
libsecret-1-dev \
43+
libx11-dev \
44+
libxkbfile-dev
45+
yarn install --immutable
3946
4047
- name: Run i18n:push script
4148
run: yarn run i18n:push

.github/workflows/i18n-weekly-pull.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ jobs:
3535
version: 3.x
3636

3737
- name: Install dependencies
38-
run: yarn install --immutable
38+
run: |
39+
sudo apt-get \
40+
--yes \
41+
install \
42+
libsecret-1-dev \
43+
libx11-dev \
44+
libxkbfile-dev
45+
yarn install --immutable
3946
4047
- name: Run i18n:pull script
4148
run: yarn run i18n:pull

.github/workflows/test-javascript.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,16 @@ jobs:
107107
repo-token: ${{ secrets.GITHUB_TOKEN }}
108108
version: 3.x
109109

110+
- name: Install Linux package dependencies
111+
if: runner.os == 'Linux'
112+
run: |
113+
sudo apt-get \
114+
--yes \
115+
install \
116+
libsecret-1-dev \
117+
libx11-dev \
118+
libxkbfile-dev
119+
110120
- name: Install npm package dependencies
111121
env:
112122
# Avoid failure of @vscode/ripgrep installation due to GitHub API rate limiting:

.github/workflows/themes-weekly-pull.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,14 @@ jobs:
3737
version: 3.x
3838

3939
- name: Install dependencies
40-
run: yarn install --immutable
40+
run: |
41+
sudo apt-get \
42+
--yes \
43+
install \
44+
libsecret-1-dev \
45+
libx11-dev \
46+
libxkbfile-dev
47+
yarn install --immutable
4148
4249
- name: Run themes:pull script
4350
run: yarn run themes:pull

0 commit comments

Comments
 (0)