action-electron-builder
action-electron-builder copied to clipboard
Job fails bsdtar command
Hi, in my repository and branch: https://github.com/mlajtos/mosaic/pull/5/files
The Windows and Mac builds are ok, but Linux fails this way:
⨯ cannot execute cause=exit status 1
out={:timestamp=>"2020-08-12T09:13:45.777839+0000", :message=>"Process failed: /bin/sh failed (exit code 127). Full command was:[\"/bin/sh\", \"-c\", \"LANG=C bsdtar -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link' opt usr .PKGINFO .INSTALL\"]", :level=>:error}
command=/home/runner/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64/fpm -s dir --force -t pacman -d c-ares -d ffmpeg -d gtk3 -d http-parser -d libevent -d libvpx -d libxslt -d libxss -d minizip -d nss -d re2 -d snappy -d libnotify -d libappindicator-gtk3 --pacman-compression xz --architecture amd64 --name mosaic-browser --after-install /tmp/t-GfXFMS/4-after-install --after-remove /tmp/t-GfXFMS/5-after-remove --description 'Web browser that can display multiple web pages at the same time in one shared window.
Web browser that can display multiple web pages at the same time in one shared window.' --version 0.0.1 --package /home/runner/work/mosaic/mosaic/dist/mosaic-browser-0.0.1.pacman --maintainer 'Milan Lajtoš <[email protected]>' --url https://github.com/michalklempa/mosaic --vendor 'Milan Lajtoš <[email protected]>' --license MIT /home/runner/work/mosaic/mosaic/dist/linux-unpacked/=/opt/Mosaic /home/runner/work/mosaic/mosaic/build/icon.png=/usr/share/icons/hicolor/0x0/apps/mosaic.png /tmp/t-GfXFMS/9-Mosaic.desktop=/usr/share/applications/mosaic.desktop
workingDir=
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1/index.js:144
throw err;
^
Error: Command failed: yarn run electron-builder --linux
at checkExecSyncError (child_process.js:621:11)
at execSync (child_process.js:657:15)
at run (/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1/index.js:21:27)
at runAction (/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1/index.js:132:4)
at Object.<anonymous> (/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1/index.js:150:1)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 2427,
stdout: null,
stderr: null
}
Any idea what might happen? I do not see stdout/err from the sh
and bsdtar
commands to investigate.
I was getting a similar error, but after checking a little closer, I was trying to build pacman packages but with the current runner, it seems that GitHub changed the default runner to Ubuntu 20.04 a few months ago https://github.blog/changelog/2020-10-29-github-actions-ubuntu-latest-workflows-will-use-ubuntu-20-04/
This is causing some errors related with the missing binary bsdtar
used by the pacman builder. I found this workaround https://github.com/electron-userland/electron-builder/issues/4181 . Just install libarchive-tools
for the runner.
I made this using an additional step at the beginning:
- name: Install libarchive-tools for pacman build # Related https://github.com/electron-userland/electron-builder/issues/4181
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install libarchive-tools
You can check my full workflow here: https://github.com/julian-alarcon/prospect-mail/blob/develop/.github/workflows/release.yml#L31
It seems that we are not the only one with similar issues: https://github.com/hashicorp/vagrant/issues/12038 https://github.com/intel/lkp-tests/issues/50