Skip to content

Commit ec729f2

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 ec729f2

File tree

6 files changed

+42
-4
lines changed

6 files changed

+42
-4
lines changed

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

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

7979
- name: Install dependencies
80-
run: yarn install --immutable
80+
run: |
81+
# node-gyp dependency
82+
sudo apt-get \
83+
--yes \
84+
install \
85+
libsecret-1-dev
86+
yarn install --immutable
8187
env:
8288
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8389

.github/workflows/check-javascript.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ jobs:
7979
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
8080
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8181
run: |
82+
# node-gyp dependency
83+
sudo apt-get \
84+
--yes \
85+
install \
86+
libsecret-1-dev
8287
yarn install
8388
8489
- name: Lint

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

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

3737
- name: Install dependencies
38-
run: yarn install --immutable
38+
run: |
39+
# node-gyp dependency
40+
sudo apt-get \
41+
--yes \
42+
install \
43+
libsecret-1-dev
44+
yarn install --immutable
3945
4046
- name: Run i18n:push script
4147
run: yarn run i18n:push

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

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

3737
- name: Install dependencies
38-
run: yarn install --immutable
38+
run: |
39+
# node-gyp dependency
40+
sudo apt-get \
41+
--yes \
42+
install \
43+
libsecret-1-dev
44+
yarn install --immutable
3945
4046
- name: Run i18n:pull script
4147
run: yarn run i18n:pull

.github/workflows/test-javascript.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,15 @@ 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+
# node-gyp dependency
114+
sudo apt-get \
115+
--yes \
116+
install \
117+
libsecret-1-dev
118+
110119
- name: Install npm package dependencies
111120
env:
112121
# Avoid failure of @vscode/ripgrep installation due to GitHub API rate limiting:

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

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

3939
- name: Install dependencies
40-
run: yarn install --immutable
40+
run: |
41+
# node-gyp dependency
42+
sudo apt-get \
43+
--yes \
44+
install \
45+
libsecret-1-dev
46+
yarn install --immutable
4147
4248
- name: Run themes:pull script
4349
run: yarn run themes:pull

0 commit comments

Comments
 (0)