Skip to content

Commit

Permalink
Merge pull request #43 from lightningrodlabs/damien_ludotheque
Browse files Browse the repository at this point in the history
ludotheque, version mismatch prompt and 127 support
  • Loading branch information
ddd-mtl authored Apr 9, 2022
2 parents 175e640 + 5634b3a commit f3e810c
Show file tree
Hide file tree
Showing 85 changed files with 5,212 additions and 10,991 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build-dna.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: build-dna

on:
workflow_call:

jobs:
build-dna:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# install hc tool
- name: Install hc tool and wasm target
shell: bash # important because this runs shell scripts
run: |
npm run ci:hc-install
# build dna
- name: Build DNA
run: |
npm run build:happ
# Hash Zome
- name: Hash Zome Install
run: |
npm run hash-zome-install
- name: Hash Zome Install
run: |
npm run hash-zome
# "upload" dna build artifacts
- uses: actions/upload-artifact@master
with:
name: where-dna-artifact
path: dna/workdir/dna-where/where.dna
- uses: actions/upload-artifact@master
with:
name: where-happ-artifact
path: dna/workdir/happ-where/where.happ
- uses: actions/upload-artifact@master
with:
name: where-hash-artifact
path: dna/where_zome_hash.txt
# Setup npm
- name: Install nodejs dependencies
run: |
npm install where --ignore-scripts
# Build happ
- name: Build happ
run: |
npm run build:ui
# Build web-happ
- name: Build web-happ
run: |
npm run build:webapp
# "upload" web-happ as build artifact
- uses: actions/upload-artifact@master
with:
name: where-webapp-artifact
path: workdir/where.webhapp
61 changes: 14 additions & 47 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- v[0-9]+.*

env:
WHERE_VERSION: 0.0.8
WHERE_VERSION: 0.0.9
USE_HARD_LINKS: false

jobs:
Expand All @@ -20,50 +20,13 @@ jobs:
# (required)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-dna:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# install hc tool
- name: Install hc tool and wasm target
shell: bash # important because this runs shell scripts
run: |
npm run ci:hc-install
# build dna
- name: Build DNA
run: |
npm run build:happ
# "upload" dna as build artifact
- uses: actions/upload-artifact@master
with:
name: where-dna-artifact
path: dna/workdir/dna/where.dna
# "upload" happ as build artifact
- uses: actions/upload-artifact@master
with:
name: where-happ-artifact
path: dna/workdir/happ/where.happ
# Setup npm
- name: Install nodejs dependencies
run: |
npm install where --ignore-scripts
# Build happ
- name: Build happ
run: |
npm run build:ui
# Build web-happ
- name: Build web-happ
run: |
npm run build:webapp
# "upload" web-happ as build artifact
- uses: actions/upload-artifact@master
with:
name: where-webapp-artifact
path: workdir/where.webhapp
# Build the dna & happ
call-build-dna:
uses: ./.github/workflows/build-dna.yml

# upload the app package for each target os
build-binaries:
needs: build-dna
needs: call-build-dna
strategy:
#fail-fast: false
matrix:
Expand All @@ -79,21 +42,25 @@ jobs:
- name: clearing precompiled dna files
continue-on-error: true
run: |
rm dna/workdir/dna/where.dna
rm dna/workdir/happ/where.happ
rm dna/workdir/dna-where/where.dna
rm dna/workdir/happ-where/where.happ
# Download previously uploaded artifacts
- uses: actions/download-artifact@master
with:
name: where-dna-artifact
path: dna/workdir/dna
path: dna/workdir/dna-where
- uses: actions/download-artifact@master
with:
name: where-happ-artifact
path: dna/workdir/happ
path: dna/workdir/happ-where
- uses: actions/download-artifact@master
with:
name: where-webapp-artifact
path: workdir
- uses: actions/download-artifact@master
with:
name: where-hash-artifact
path: workdir
# Check if exist
- name: list webhapp
continue-on-error: true
Expand Down Expand Up @@ -140,7 +107,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${GITHUB_REF#refs/tags/}" "electron/out/Where-$WHERE_VERSION.AppImage" --clobber
gh release upload "${GITHUB_REF#refs/tags/}" "dna/workdir/happ/where.happ" --clobber
gh release upload "${GITHUB_REF#refs/tags/}" "dna/workdir/happ-where/where.happ" --clobber
gh release upload "${GITHUB_REF#refs/tags/}" "workdir/where.webhapp" --clobber
- name: upload binary (macos only)
if: ${{ runner.os == 'macOs' }}
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ name: test-workflow x64
on: workflow_dispatch

env:
WHERE_VERSION: 0.0.8
WHERE_VERSION: 0.0.9
USE_HARD_LINKS: false

jobs:
# Build the dna & happ
call-build-dna:
uses: ./.github/workflows/build-dna.yml

# upload the app package for each target os
build-binaries:
needs: call-build-dna
strategy:
fail-fast: false
matrix:
Expand All @@ -25,7 +30,7 @@ jobs:
continue-on-error: true
run: |
tsc --version
working-directory: dna/workdir/happ
working-directory: dna/workdir/happ-where
# Setup npm
- name: Install nodejs dependencies
run: |
Expand All @@ -50,7 +55,7 @@ jobs:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# npm run dist-linux
# gh release upload "v0.0.8-rc6" "electron/out/where-$WHERE_VERSION.tar.gz" --clobber
# gh release upload "manual-release" "electron/out/where-$WHERE_VERSION.tar.gz" --clobber
# upload installers and binaries
- name: list builds
continue-on-error: true
Expand All @@ -69,16 +74,16 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "v0.0.8-rc6" "electron/out/Where-$WHERE_VERSION.AppImage" --clobber
gh release upload "manual-release" "electron/out/Where-$WHERE_VERSION.AppImage" --clobber
- name: upload binary (macos only)
if: ${{ runner.os == 'macOs' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "v0.0.8-rc6" "electron/out/Where-$WHERE_VERSION.dmg" --clobber
gh release upload "manual-release" "electron/out/Where-$WHERE_VERSION.dmg" --clobber
- name: upload binary (Windows only)
if: ${{ runner.os == 'Windows' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "v0.0.8-rc6" "electron/out/Where.Setup.$env:WHERE_VERSION.exe" --clobber
gh release upload "manual-release" "electron/out/Where.Setup.$env:WHERE_VERSION.exe" --clobber
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ node_modules/
dist/
.cargo/
.hc*
dna/workdir/dna/*.dna
dna/workdir/happ/*.happ
dna/workdir/dna*/*.dna
dna/workdir/happ*/*.happ
workdir/*.webhapp
*.tsbuildinfo
.running
.running
Loading

0 comments on commit f3e810c

Please sign in to comment.