mirror of
https://github.com/logseq/logseq.git
synced 2026-04-26 15:15:01 +00:00
add build support for linux arm64
This commit is contained in:
82
.github/workflows/build-desktop-release.yml
vendored
82
.github/workflows/build-desktop-release.yml
vendored
@@ -222,7 +222,7 @@ jobs:
|
||||
DEBUG: "pw:api"
|
||||
RELEASE: true # skip dev only test
|
||||
|
||||
build-linux:
|
||||
build-linux-x64:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ compile-cljs ]
|
||||
steps:
|
||||
@@ -265,7 +265,61 @@ jobs:
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: logseq-linux-builds
|
||||
name: logseq-linux-x64-builds
|
||||
path: builds
|
||||
|
||||
build-linux-arm64:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ compile-cljs ]
|
||||
steps:
|
||||
- name: Download The Static Asset
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: static
|
||||
path: static
|
||||
|
||||
- name: Retrieve tag version
|
||||
id: ref
|
||||
run: |
|
||||
pkgver=$(cat ./static/VERSION)
|
||||
echo "version=$pkgver" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Node.js, NPM and Yarn
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Fetch deps
|
||||
env:
|
||||
npm_config_arch: arm64
|
||||
run: |
|
||||
yarn install --target_arch=arm64 --target_platform=linux
|
||||
rsapi_version=`node -e 'console.log(require("@logseq/rsapi/package.json").optionalDependencies["@logseq/rsapi-linux-arm64-gnu"])'`
|
||||
temp_dir=`mktemp -d`
|
||||
cd "$temp_dir"
|
||||
echo '{"dependencies": {"@logseq/rsapi-linux-arm64-gnu": "'"$rsapi_version"'"}}' > package.json
|
||||
yarn install --ignore-platform
|
||||
cd -
|
||||
mv "$temp_dir/node_modules/@logseq/rsapi-linux-arm64-gnu" node_modules/@logseq/rsapi-linux-arm64-gnu
|
||||
rm -rf "$temp_dir" "node_modules/@logseq/rsapi-linux-x64-gnu"
|
||||
working-directory: ./static
|
||||
|
||||
- name: Build/Release Electron App
|
||||
run: yarn electron:make-linux-arm64
|
||||
working-directory: ./static
|
||||
|
||||
- name: Save artifacts
|
||||
run: |
|
||||
mkdir -p builds
|
||||
# NOTE: save VERSION file to builds directory
|
||||
cp static/VERSION ./builds/VERSION
|
||||
# mv static/out/make/*-*.AppImage ./builds/Logseq-linux-arm64-${{ steps.ref.outputs.version }}.AppImage
|
||||
mv static/out/make/zip/linux/arm64/*-linux-arm64-*.zip ./builds/Logseq-linux-arm64-${{ steps.ref.outputs.version }}.zip
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: logseq-linux-arm64-builds
|
||||
path: builds
|
||||
|
||||
build-windows:
|
||||
@@ -498,7 +552,7 @@ jobs:
|
||||
|
||||
nightly-release:
|
||||
if: ${{ github.event_name == 'schedule' || github.event.inputs.build-target == 'nightly' }}
|
||||
needs: [ build-macos-x64, build-macos-arm64, build-linux, build-windows, build-android, e2e-test ]
|
||||
needs: [ build-macos-x64, build-macos-arm64, build-linux-x64, build-linux-arm64, build-windows, build-android, e2e-test ]
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Download MacOS x64 Artifacts
|
||||
@@ -513,10 +567,16 @@ jobs:
|
||||
name: logseq-darwin-arm64-builds
|
||||
path: ./
|
||||
|
||||
- name: Download The Linux Artifacts
|
||||
- name: Download The Linux x64 Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: logseq-linux-builds
|
||||
name: logseq-linux-x64-builds
|
||||
path: ./
|
||||
|
||||
- name: Download The Linux arm64 Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: logseq-linux-arm64-builds
|
||||
path: ./
|
||||
|
||||
- name: Download The Windows Artifact
|
||||
@@ -565,7 +625,7 @@ jobs:
|
||||
release:
|
||||
# NOTE: For now, we only have beta channel to be released on Github
|
||||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.build-target == 'beta' }}
|
||||
needs: [ build-macos-x64, build-macos-arm64, build-linux, build-windows, e2e-test ]
|
||||
needs: [ build-macos-x64, build-macos-arm64, build-linux-x64, build-linux-arm64, build-windows, e2e-test ]
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Download MacOS x64 Artifacts
|
||||
@@ -580,10 +640,16 @@ jobs:
|
||||
name: logseq-darwin-arm64-builds
|
||||
path: ./
|
||||
|
||||
- name: Download The Linux Artifacts
|
||||
- name: Download The Linux x64 Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: logseq-linux-builds
|
||||
name: logseq-linux-x64-builds
|
||||
path: ./
|
||||
|
||||
- name: Download The Linux arm64 Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: logseq-linux-arm64-builds
|
||||
path: ./
|
||||
|
||||
- name: Download The Windows Artifact
|
||||
|
||||
Reference in New Issue
Block a user