Compare commits
No commits in common. "500fea5c3769880d90a9751f36c1914913f9ed9f" and "f8b524a540728ff77b03e7b91be443e05dfe1e4a" have entirely different histories.
500fea5c37
...
f8b524a540
1 changed files with 100 additions and 1 deletions
101
.github/workflows/build.yml
vendored
101
.github/workflows/build.yml
vendored
|
@ -57,9 +57,108 @@ jobs:
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
|
working-directory: ./reticulum-meshchat
|
||||||
uses: https://github.com/ncipollo/release-action@v1
|
uses: https://github.com/ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
tag: "${{ env.LATEST_TAG }}"
|
tag: "${{ env.LATEST_TAG }}"
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
replacesArtifacts: true
|
replacesArtifacts: true
|
||||||
artifacts: "reticulum-meshchat/dist/*-amd64-linux.AppImage"
|
artifacts: "dist/ReticulumMeshChat-${{ env.LATEST_TAG }}-linux-amd64.AppImage"
|
||||||
|
|
||||||
|
build_linux_aarch64:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: https://github.com/docker/setup-qemu-action@v3
|
||||||
|
with:
|
||||||
|
platforms: arm64
|
||||||
|
|
||||||
|
- name: Clone Main Repo
|
||||||
|
run: |
|
||||||
|
git clone --depth 1 https://github.com/liamcottle/reticulum-meshchat reticulum-meshchat
|
||||||
|
|
||||||
|
- name: Get Latest Tag
|
||||||
|
working-directory: ./reticulum-meshchat
|
||||||
|
run: |
|
||||||
|
git fetch --tags --quiet https://github.com/liamcottle/reticulum-meshchat
|
||||||
|
LATEST_TAG=$(git describe --tags --abbrev=0)
|
||||||
|
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
|
||||||
|
echo "Latest tag is $LATEST_TAG"
|
||||||
|
git checkout $LATEST_TAG
|
||||||
|
|
||||||
|
- name: Setup ARM64 Build Environment
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y qemu-user-static binfmt-support
|
||||||
|
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Build in ARM64 Container
|
||||||
|
run: |
|
||||||
|
cat > Dockerfile << 'EOF'
|
||||||
|
FROM arm64v8/ubuntu:22.04
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
git curl wget python3 python3-pip \
|
||||||
|
build-essential libssl-dev \
|
||||||
|
fakeroot rpm libsqlite3-dev libffi-dev \
|
||||||
|
libx11-dev libxkbfile-dev libsecret-1-dev \
|
||||||
|
libasound2 libnss3 libxtst6 libglib2.0-0 libgconf-2-4
|
||||||
|
|
||||||
|
# Install Node.js 18
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
||||||
|
RUN apt-get install -y nodejs
|
||||||
|
|
||||||
|
# Set up working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy application code
|
||||||
|
COPY ./reticulum-meshchat /app
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN pip3 install -r requirements.txt
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Build the AppImage
|
||||||
|
CMD npm run dist
|
||||||
|
EOF
|
||||||
|
|
||||||
|
docker buildx build --platform linux/arm64 -t arm64-build-env .
|
||||||
|
|
||||||
|
# Run the build process in the container
|
||||||
|
docker run --platform linux/arm64 --rm -v $(pwd)/reticulum-meshchat:/app \
|
||||||
|
-e ELECTRON_BUILDER_ARCH=arm64 \
|
||||||
|
-v $(pwd)/dist:/app/dist \
|
||||||
|
arm64-build-env
|
||||||
|
|
||||||
|
# Copy the built artifacts
|
||||||
|
mkdir -p reticulum-meshchat/dist
|
||||||
|
cp -r dist/* reticulum-meshchat/dist/ || true
|
||||||
|
|
||||||
|
- name: Rename AppImage with ARM64 Label
|
||||||
|
run: |
|
||||||
|
mkdir -p reticulum-meshchat/dist
|
||||||
|
for file in output/*.AppImage; do
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
FILENAME=$(basename "$file")
|
||||||
|
NAME_WITHOUT_EXT="${FILENAME%.AppImage}"
|
||||||
|
cp "$file" "reticulum-meshchat/dist/${NAME_WITHOUT_EXT}-arm64.AppImage"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
ls -la reticulum-meshchat/dist/
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
working-directory: ./reticulum-meshchat
|
||||||
|
uses: https://github.com/ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
tag: "${{ env.LATEST_TAG }}"
|
||||||
|
allowUpdates: true
|
||||||
|
replacesArtifacts: true
|
||||||
|
artifacts: "reticulum-meshchat/dist/ReticulumMeshChat-${{ env.LATEST_TAG }}-linux-arm64.AppImage"
|
||||||
|
|
Loading…
Add table
Reference in a new issue