Skip to content

Commit

Permalink
Add fetch script and github workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
culler committed Jan 11, 2025
1 parent ae4a7d4 commit c3e954a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build app root

on: [push, pull_request]

jobs:
build_app_root:
name: Build app root
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Build AppImage
run: |
make
- uses: actions/upload-artifact@v4
with:
name: app_root
path: *.AppImage
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ all: Setup SnapPyApp
.PHONY: Setup SnapPyApp

Setup:
echo fetch app_root tarball
bash bin/fetch_app_root.sh
bash bin/install_snappy.sh
rm -rf app_root
tar xvfz app_root_final.tgz
tar xfz app_root_final.tgz

SnapPyApp:
cp app_files/* app_root
Expand Down
20 changes: 20 additions & 0 deletions bin/fetch_app_root.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
PYTHON_VERSION=3.13
RELEASE_TAG=v1.0
ARCHIVE=app_root-${PYTHON_VERSION}.tgz
HASH_FILE=app_root-${PYTHON_VERSION}.sha256
DOWNLOAD=https://github.com/3-manifolds/py_appimage/releases/download
ARCHIVE_URL=${DOWNLOAD}/${RELEASE_TAG}/${ARCHIVE}
HASH_URL=${DOWNLOAD}/${RELEASE_TAG}/${HASH_FILE}
if ! [ -e ${ARCHIVE} ]; then
curl -L -O ${ARCHIVE_URL}
fi
if ! [ -e ${HASH_FILE} ]; then
curl -L -O ${HASH_URL}
fi
ACTUAL_HASH=`sha256sum ${ARCHIVE}`
HASH=`cat ${HASH_FILE}`
if [ "${HASH}" != "${ACTUAL_HASH}" ]; then
echo Invalid sha256 hash
exit 1
fi

0 comments on commit c3e954a

Please sign in to comment.