From 27a7bfe3732c7e90af538c0e382e76b7529ee75c Mon Sep 17 00:00:00 2001 From: Dylan Box Date: Sun, 9 Jan 2022 16:46:31 -0500 Subject: [PATCH] Build: Package and deploy step Turned off macOS builds to save time for the moment --- .github/workflows/main.yml | 77 ++++++++++++++++-- package-lock.json | 161 ++++++++++++++++++------------------- package.json | 17 ++-- 3 files changed, 162 insertions(+), 93 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59d4e3d..bd1dfcb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,19 +10,26 @@ jobs: build: strategy: matrix: - os: [ubuntu-18.04, macos-latest] + # Removing macos-latest for now + os: [ubuntu-18.04] runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v2 - + + - uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 'lts/*' - cache: 'npm' - name: Install Dependencies (Linux) run: | @@ -33,7 +40,7 @@ jobs: sudo apt-get install libxkbcommon-x11-0 if: matrix.os == 'ubuntu-18.04' - - name: Install Dependencies (macOS) + - name: Install Dependencies (MacOS) run: | brew install cmake brew install make @@ -46,7 +53,67 @@ jobs: run: npx nodegui-packer --init LookingGlass - name: Build distributions - run: QT_DEBUG_PLUGINS=1 npm run build + run: npm run build + + - name: upload Linux artifacts + uses: actions/upload-artifact@v2 + with: + name: linux-build + path: deploy/linux/build/LookingGlass/Application-x86_64.AppImage + if: matrix.os == 'ubuntu-18.04' + + - name: upload MacOS artifacts + uses: actions/upload-artifact@v2 + with: + name: macos-build + path: deploy/darwin/build/LookingGlass.dmg + if: matrix.os == 'macos-latest' + + release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 'lts/*' + + # TODO: Only install the semantic release dependencies + - name: Install Linux dependencies + run: | + sudo apt-get update + sudo apt-get install pkg-config build-essential + sudo apt-get install cmake make + sudo apt-get install mesa-common-dev libglu1-mesa-dev + sudo apt-get install libxkbcommon-x11-0 + + - name: Install node dependencies + run: npm install + + - name: Download Artifacts + uses: actions/download-artifact@v2 + with: + path: artifacts/ + + # Removing for now: ls -la artifacts/macos-build + - name: Check Paths + run: | + ls -la artifacts/linux-build + + # Removing for now: mv artifacts/macos-build/LookingGlass.dmg deploy/LookingGlass.dmg + - name: Rename artifacts + run: | + mv artifacts/linux-build/Application-x86_64.AppImage deploy/LookingGlass.AppImage - name: Release env: diff --git a/package-lock.json b/package-lock.json index 1b661cc..8f166a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2631,13 +2631,12 @@ } }, "cli-table3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.0.tgz", - "integrity": "sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.1.tgz", + "integrity": "sha512-w0q/enDHhPLq44ovMGdQeeDLvwxwavsJX7oQGYt/LrBlYsyaxyDnp6z3QzFut/6kLLKnlcUVJLrpB7KBfgG/RA==", "dev": true, "requires": { - "colors": "^1.1.2", - "object-assign": "^4.1.0", + "colors": "1.4.0", "string-width": "^4.2.0" }, "dependencies": { @@ -2864,9 +2863,9 @@ "dev": true }, "colors": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.1.tgz", - "integrity": "sha512-urbBmMVnD1vk0mUwCpnWv06P3f16EF+RMTtIXTkylJk5mAdfrMepu9B3hhSnL8DGkc1Ra6pENJHrXTKvcAZ0wA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", "dev": true, "optional": true }, @@ -3882,9 +3881,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.9.tgz", - "integrity": "sha512-MBwILhhD92sziIrMQwpqcuGERF+BH99ei2a3XsGJuqEKcSycAL+w0HWokFenZXona+kjFr82Lf71eTxNRC06XQ==", + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.10.tgz", + "integrity": "sha512-s9nFhFnvR63wls6/kM88kQqDhMu0AfdjqouE2l5GVQPbqLgyFjjU5ry/r2yKsJxpb9Py1EYNqieFrmMaX4v++A==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -5697,76 +5696,76 @@ "integrity": "sha512-120p116CE8VMMZ+hk8IAb1inCPk4Dj3VZw29/n2g6UI77urJKVYb7FZUDW8hY+EBnfsjI/2yrobBgFyzo7YpVQ==", "dev": true, "requires": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^2.9.0", - "@npmcli/ci-detect": "^1.2.0", - "@npmcli/config": "^2.3.0", - "@npmcli/map-workspaces": "^1.0.4", - "@npmcli/package-json": "^1.0.1", - "@npmcli/run-script": "^1.8.6", - "abbrev": "~1.1.1", - "ansicolors": "~0.3.2", - "ansistyles": "~0.1.3", - "archy": "~1.0.0", - "cacache": "^15.3.0", - "chalk": "^4.1.2", - "chownr": "^2.0.0", - "cli-columns": "^3.1.2", - "cli-table3": "^0.6.0", - "columnify": "~1.5.4", - "fastest-levenshtein": "^1.0.12", - "glob": "^7.2.0", - "graceful-fs": "^4.2.8", - "hosted-git-info": "^4.0.2", - "ini": "^2.0.0", - "init-package-json": "^2.0.5", - "is-cidr": "^4.0.2", - "json-parse-even-better-errors": "^2.3.1", - "libnpmaccess": "^4.0.2", - "libnpmdiff": "^2.0.4", - "libnpmexec": "^2.0.1", - "libnpmfund": "^1.1.0", - "libnpmhook": "^6.0.2", - "libnpmorg": "^2.0.2", - "libnpmpack": "^2.0.1", - "libnpmpublish": "^4.0.1", - "libnpmsearch": "^3.1.1", - "libnpmteam": "^2.0.3", - "libnpmversion": "^1.2.1", - "make-fetch-happen": "^9.1.0", - "minipass": "^3.1.3", - "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", - "mkdirp-infer-owner": "^2.0.0", - "ms": "^2.1.2", - "node-gyp": "^7.1.2", - "nopt": "^5.0.0", - "npm-audit-report": "^2.1.5", - "npm-install-checks": "^4.0.0", - "npm-package-arg": "^8.1.5", - "npm-pick-manifest": "^6.1.1", - "npm-profile": "^5.0.3", - "npm-registry-fetch": "^11.0.0", - "npm-user-validate": "^1.0.1", - "npmlog": "^5.0.1", - "opener": "^1.5.2", - "pacote": "^11.3.5", - "parse-conflict-json": "^1.1.1", - "qrcode-terminal": "^0.12.0", - "read": "~1.0.7", - "read-package-json": "^4.1.1", - "read-package-json-fast": "^2.0.3", - "readdir-scoped-modules": "^1.1.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "ssri": "^8.0.1", - "tar": "^6.1.11", - "text-table": "~0.2.0", - "tiny-relative-date": "^1.3.0", - "treeverse": "^1.0.4", - "validate-npm-package-name": "~3.0.0", - "which": "^2.0.2", - "write-file-atomic": "^3.0.3" + "@isaacs/string-locale-compare": "*", + "@npmcli/arborist": "*", + "@npmcli/ci-detect": "*", + "@npmcli/config": "*", + "@npmcli/map-workspaces": "*", + "@npmcli/package-json": "*", + "@npmcli/run-script": "*", + "abbrev": "*", + "ansicolors": "*", + "ansistyles": "*", + "archy": "*", + "cacache": "*", + "chalk": "*", + "chownr": "*", + "cli-columns": "*", + "cli-table3": "*", + "columnify": "*", + "fastest-levenshtein": "*", + "glob": "*", + "graceful-fs": "*", + "hosted-git-info": "*", + "ini": "*", + "init-package-json": "*", + "is-cidr": "*", + "json-parse-even-better-errors": "*", + "libnpmaccess": "*", + "libnpmdiff": "*", + "libnpmexec": "*", + "libnpmfund": "*", + "libnpmhook": "*", + "libnpmorg": "*", + "libnpmpack": "*", + "libnpmpublish": "*", + "libnpmsearch": "*", + "libnpmteam": "*", + "libnpmversion": "*", + "make-fetch-happen": "*", + "minipass": "*", + "minipass-pipeline": "*", + "mkdirp": "*", + "mkdirp-infer-owner": "*", + "ms": "*", + "node-gyp": "*", + "nopt": "*", + "npm-audit-report": "*", + "npm-install-checks": "*", + "npm-package-arg": "*", + "npm-pick-manifest": "*", + "npm-profile": "*", + "npm-registry-fetch": "*", + "npm-user-validate": "*", + "npmlog": "*", + "opener": "*", + "pacote": "*", + "parse-conflict-json": "*", + "qrcode-terminal": "*", + "read": "*", + "read-package-json": "*", + "read-package-json-fast": "*", + "readdir-scoped-modules": "*", + "rimraf": "*", + "semver": "*", + "ssri": "*", + "tar": "*", + "text-table": "*", + "tiny-relative-date": "*", + "treeverse": "*", + "validate-npm-package-name": "*", + "which": "*", + "write-file-atomic": "*" }, "dependencies": { "@gar/promisify": { diff --git a/package.json b/package.json index 3d46e6e..b7e75bc 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,14 @@ }, "babel": { "presets": [ - ["@babel/preset-env", { "targets": { "node": "12" } }], + [ + "@babel/preset-env", + { + "targets": { + "node": "12" + } + } + ], "@babel/preset-react" ], "plugins": [] @@ -96,12 +103,8 @@ { "assets": [ { - "path": "deploy/linux/build/LookingGlass.app", - "label": "Linux Distribution" - }, - { - "path": "deploy/darwin/build/LookingGlass.dmg", - "label": "MacOS Distribution" + "path": "deploy/LookingGlass.AppImage", + "label": "Linux (x86_64) Distribution" } ] }