diff --git a/.github/workflows/snapcraft.yml b/.github/workflows/snapcraft.yml new file mode 100644 index 0000000..6db760b --- /dev/null +++ b/.github/workflows/snapcraft.yml @@ -0,0 +1,24 @@ +on: push +name: Snap +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +jobs: + build_snap: + name: Build snap on ubuntu + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: samuelmeuli/action-snapcraft@v1 + with: + use_lxd: true + + - name: Build snap + run: sg lxd -c 'snapcraft --use-lxd' + + - uses: actions/upload-artifact@v2 + with: + name: snapped + path: '*.snap' + if-no-files-found: error diff --git a/.travis.yml b/.travis.yml index 66135eb..b845841 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,5 @@ addons: packages: - cppcheck -script: -# - mv -v bazel-bin/voidstar/voidstar "bazel-bin/voidstar/voidstar-$(git describe --abbrev --dirty --always --tags)-$TRAVIS_OS_NAME-$(basename $CC)" -- cppcheck --error-exitcode=1 --enable=all -Ivoidstar/include/ voids tar/ +script: [] +# - cppcheck --error-exitcode=1 --enable=all voidstar/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ee02c50 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +BAZEL = ./bazelisk + +voidstar: $(BAZEL) + $(BAZEL) build $@ + +$(BAZEL): + curl -fsSLo $@ https://github.com/bazelbuild/bazelisk/releases/download/v1.6.1/bazelisk-linux-amd64 && chmod +x $@ + +install: DESTDIR ?= . +install: + cp -v bazel-bin/voidstar/voidstar $(DESTDIR)/ + +debug: + snapcraft diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000..64792aa --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,77 @@ +name: voidstar +version: git +summary: void* casts files onto 2D/3D colored spaces for your mind blowing needs # 79 char long summary +description: | + Usage: + voidstar [OPTIONS] FILE... + + -l, --list list backends + -u, --ui choose ui mode + -a, --algorithm algorithm to apply + + -x, --width window width + -y, --height window height + -f, --fullscreen start on fullscreen + --keep-chrome show title bar & allow resizing + + -w, --sliding length of sliding window + -s, --slide-step amount of points slid + -m, --move move sliding window forward + -n, --spin don't spin shape on itself + + -b, --begin begin offset for the range + -e, --end end offset for the range (0: till end of file) + + -h, --help this help + + # Press H and L to switch between files + # Use A W S D Z X and your mouse to move in the 3D space + # Press F for full screen + # Use the arrows to slide and enlarge the sliding window + # Press M to slide the window to the end + # Use > to slide faster, < to slow down + # SPACE to toggle spinning the shape + # Press O to reset the camera position + # ESC to quit + + +grade: stable +base: core20 +# confinement: strict +confinement: devmode + +apps: + voidstar: + command: voidstar + environment: + # https://forum.snapcraft.io/t/opengl-error-mesa-loader-fails/15197/2 + LD_LIBRARY_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa-gl:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/xorg + LIBGL_DRIVERS_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri + plugs: + - home # to read files in $HOME + - network # to read URLs + - opengl # to access rendering hardware + - optical-drive # to read CDs + - removable-media # to read USB keys + - wayland + - x11 # to create windows + +parts: + voidstar: + plugin: make + source: . + build-packages: + - curl + - g++ + - libgl1-mesa-dev + - make + - xorg-dev + stage-packages: + - libdri2-1 + - libdrm2 + - libgl1-mesa-dev + - libgl1-mesa-glx + - libgles2-mesa + - xorg-dev + # after: + # - desktop-glib-only # https://snapcraft.io/docs/gpu-support diff --git a/snap/snapcraft.yml b/snap/snapcraft.yml deleted file mode 100644 index f9d3d40..0000000 --- a/snap/snapcraft.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: voidstar -version: '1.14.238936273' # just for humans, typically '1.2+git' or '1.3.2' -summary: void* casts files onto 2D/3D colored spaces for your mind blowing needs # 79 char long summary -description: | - https://github.com/fenollp/voidstar/blob/master/README.md - -grade: stable -confinement: strict - -apps: - voidstar: - command: bin/voidstar - plugs: - - opengl # to access rendering hardware - - x11 # to create windows - - home # to read files in $HOME - - removable-media # to read USB keys - - optical-drive # to read CDs - - network # to read URLs - -parts: - voidstar: - plugin: cmake - # source: https://github.com/fenollp/voidstar.git - source: . - configflags: - - -DCMAKE_INSTALL_PREFIX=/bin