Build for GNULinux #116
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build for GNULinux | |
| on: workflow_dispatch | |
| jobs: | |
| build-x86: | |
| runs-on: ubuntu-latest | |
| env: | |
| WOLFRAM_SYSTEM_ID: Linux-x86-64-v8 | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| sudo apt-get -y update | |
| sudo apt-get -y install build-essential | |
| sudo apt-get -y install libuv1-dev | |
| - name: Install Git in container | |
| run: | | |
| sudo apt-get -y update | |
| sudo apt-get -y install git | |
| # one time fix to avoid permission problems later on | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| # Checks-out the repository under $GITHUB_WORKSPACE. | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GH_TOKEN }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '23' | |
| - name: Patch specific dependencies from package.json | |
| run: | | |
| cat << 'EOF' > clean-package-json.js | |
| const fs = require('fs'); | |
| const path = './package.json'; | |
| const pkg = JSON.parse(fs.readFileSync(path, 'utf8')); | |
| const depsToRemove = [ | |
| "dmg-license", | |
| "electron-trackpad-utils" | |
| ]; | |
| ['dependencies', 'devDependencies'].forEach(section => { | |
| if (pkg[section]) { | |
| depsToRemove.forEach(dep => { | |
| delete pkg[section][dep]; | |
| }); | |
| } | |
| }); | |
| fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n'); | |
| EOF | |
| node clean-package-json.js | |
| rm clean-package-json.js | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build electron | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| run: npm run dist-linux86 | |
| build-ARM: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GH_TOKEN }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '23' | |
| - name: Patch specific dependencies from package.json | |
| run: | | |
| cat << 'EOF' > clean-package-json.js | |
| const fs = require('fs'); | |
| const path = './package.json'; | |
| const pkg = JSON.parse(fs.readFileSync(path, 'utf8')); | |
| const depsToRemove = [ | |
| "dmg-license", | |
| "electron-trackpad-utils" | |
| ]; | |
| ['dependencies', 'devDependencies'].forEach(section => { | |
| if (pkg[section]) { | |
| depsToRemove.forEach(dep => { | |
| delete pkg[section][dep]; | |
| }); | |
| } | |
| }); | |
| fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n'); | |
| EOF | |
| node clean-package-json.js | |
| rm clean-package-json.js | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Install Ruby and dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ruby ruby-dev build-essential | |
| - name: Install FPM gem | |
| run: | | |
| sudo gem install fpm | |
| - name: Set up Ruby environment | |
| run: | | |
| echo "USE_SYSTEM_FPM=true" >> $GITHUB_ENV | |
| export GEM_HOME="$(ruby -e 'puts Gem.user_dir')" | |
| echo "GEM_HOME=$GEM_HOME" >> $GITHUB_ENV | |
| echo "$GEM_HOME/bin" >> $GITHUB_PATH | |
| - name: Display Ruby and FPM info | |
| run: | | |
| echo "Ruby version: $(ruby -v)" | |
| echo "FPM version: $(fpm --version)" | |
| - name: Build electron | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| run: npm run dist-linux |