Skip to content

Commit d0e9d3b

Browse files
committed
Install libsecret dependency in Linux GitHub Actions runner
On Linux, Arduino IDE has a transitive depency on the "libsecret" library, via node-gyp. Previous Linux GitHub Actions runner machine images included libsecret, and so previously the workflows that install the Arduino IDE dependencies did not have any provision for installation of libsecret. libsecret was 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 ``` The failure is fixed by configuring the relevant workflows to explicitly install the "libsecret-1-dev" Debian package that provides the library.
1 parent 6eef09e commit d0e9d3b

File tree

6 files changed

+18
-4
lines changed

6 files changed

+18
-4
lines changed

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

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

7979
- name: Install dependencies
80-
run: yarn install --immutable
80+
run: |
81+
apt-get install libsecret-1-dev # node-gyp dependency
82+
yarn install --immutable
8183
env:
8284
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8385

.github/workflows/check-javascript.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
8080
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8181
run: |
82+
apt-get install libsecret-1-dev # node-gyp dependency
8283
yarn install
8384
8485
- name: Lint

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

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

3737
- name: Install dependencies
38-
run: yarn install --immutable
38+
run: |
39+
apt-get install libsecret-1-dev # node-gyp dependency
40+
yarn install --immutable
3941
4042
- name: Run i18n:push script
4143
run: yarn run i18n:push

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

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

3737
- name: Install dependencies
38-
run: yarn install --immutable
38+
run: |
39+
apt-get install libsecret-1-dev # node-gyp dependency
40+
yarn install --immutable
3941
4042
- name: Run i18n:pull script
4143
run: yarn run i18n:pull

.github/workflows/test-javascript.yml

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

110+
- name: Install Debian package dependencies
111+
if: runner.os == 'Linux'
112+
run: |
113+
apt-get install libsecret-1-dev # node-gyp dependency
114+
110115
- name: Install npm package dependencies
111116
env:
112117
# Avoid failure of @vscode/ripgrep installation due to GitHub API rate limiting:

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

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

3939
- name: Install dependencies
40-
run: yarn install --immutable
40+
run: |
41+
apt-get install libsecret-1-dev # node-gyp dependency
42+
yarn install --immutable
4143
4244
- name: Run themes:pull script
4345
run: yarn run themes:pull

0 commit comments

Comments
 (0)