Skip to content

Commit

Permalink
merge: Fixed conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
red-game-dev committed Oct 24, 2023
1 parent 786c4c7 commit 2c249d1
Show file tree
Hide file tree
Showing 192 changed files with 14,858 additions and 10,838 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build-mac-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build mac arm64

on:
workflow_dispatch:

env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
RUDDERSTACK_CLIENT_ID: ${{ secrets.RUDDERSTACK_CLIENT_ID }}

jobs:
release-mac-arm64:
runs-on: macos-latest-xlarge

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: 'recursive'
token: ${{ secrets.pat }}

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'

- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Install dependencies
run: yarn setup

- name: Build artifacts.
run: yarn release:mac:arm64
env:
NOTARIZE: true
18 changes: 6 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
name: win-setup
path: dist/HyperPlay*.exe
retention-days: 14
retention-days: 7
build_linux:
runs-on: ubuntu-latest
concurrency:
Expand Down Expand Up @@ -77,10 +77,10 @@ jobs:
run: yarn dist:linux:ci:rpm
- name: Build pacman artifact
run: yarn dist:linux:ci:pacman
build_mac:
build_mac_x64:
runs-on: macos-13
concurrency:
group: build-mac-${{ github.ref }}
group: build-mac-x64-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout repository.
Expand All @@ -102,18 +102,12 @@ jobs:
- name: Install modules.
run: yarn setup
- name: Build artifacts.
run: yarn dist:mac
run: yarn dist:mac:x64
env:
NOTARIZE: false
- name: Upload Intel build.
uses: actions/upload-artifact@v3
with:
name: mac-dmg-Intel
name: mac-dmg-x64
path: dist/HyperPlay*x64.dmg
retention-days: 14
- name: Upload M1/M2.
uses: actions/upload-artifact@v3
with:
name: mac-dmg-M1-M2
path: dist/HyperPlay*arm64.dmg
retention-days: 14
retention-days: 7
79 changes: 79 additions & 0 deletions .github/workflows/release_aur.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Update AUR

on:
release:
types: [published]

jobs:
update-aur:
runs-on: ubuntu-latest

container:
image: archlinux

steps:
- name: Install Dependencies
run: |
pacman -Syu --noconfirm wget jq
- name: Download Package
run: |
set -x
latest_version=$(curl -s https://api.github.com/repos/HyperPlay-Gaming/hyperplay-desktop-client/releases/latest | jq -r .tag_name)
version_without_v=$(echo $latest_version | cut -c 2-)
wget https://github.com/HyperPlay-Gaming/hyperplay-desktop-client/releases/download/${latest_version}/hyperplay-${version_without_v}.pacman -O hyperplay.pacman
set +x
if: ${{ success() }}

- name: Update PKGBUILD
run: |
set -x
latest_version=$(curl -s https://api.github.com/repos/HyperPlay-Gaming/hyperplay-desktop-client/releases/latest | jq -r .tag_name)
pkgver=${latest_version#v}
pkgrel=1
url="https://github.com/HyperPlay-Gaming/hyperplay-desktop-client"
_filename=hyperplay-${pkgver}.pacman
source=("$url/releases/download/$latest_version/$_filename")
md5sums=($(md5sum hyperplay.pacman | cut -d' ' -f1))
cat <<EOF > PKGBUILD
# Maintainer: flaviofearn <[email protected]>
# Maintainer: blingus <[email protected]>
pkgname=hyperplay
pkgver=$pkgver
pkgrel=$pkgrel
pkgdesc="An open source Web3 gaming platform."
arch=('x86_64')
url="$url"
license=('GPL3')
depends=('gawk')
_filename=$_filename
source=("$source")
noextract=("$_filename")
md5sums=(${md5sums[@]})
options=(!strip)
package() {
tar -xJv -C "\$pkgdir" -f "\$srcdir/\$_filename" usr opt
mkdir "\$pkgdir/usr/bin"
ln -s "/opt/HyperPlay/hyperplay" "\$pkgdir/usr/bin/hyperplay"
}
# vim:set ts=2 sw=2 et: syntax=sh
EOF
cat PKGBUILD
set +x
if: ${{ success() }}

- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v2
with:
pkgname: hyperplay
pkgbuild: ./PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE }}
commit_message: Update AUR package
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
36 changes: 34 additions & 2 deletions .github/workflows/release_macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
TEAMID: ${{ secrets.TEAMID }}

jobs:
build-and-release:
release-x64:
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -45,6 +45,38 @@ jobs:
run: yarn setup

- name: Build artifacts.
run: yarn release:mac
run: yarn release:mac:x64
env:
NOTARIZE: true

release-arm64:
runs-on: macos-latest-xlarge

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: 'recursive'
token: ${{ secrets.pat }}

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'

- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Install dependencies
run: yarn setup

- name: Build artifacts.
run: yarn release:mac:arm64
env:
NOTARIZE: true
2 changes: 1 addition & 1 deletion .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
yarn
yarn setup
2 changes: 1 addition & 1 deletion .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
yarn
yarn setup
46 changes: 23 additions & 23 deletions e2e/__specs__/hpStoreApi.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ test.describe('hp store api tests', function () {

const pauseDownload = async () => {
await page.evaluate(async () => {
window.api.pauseCurrentDownload()
return window.api.pauseCurrentDownload()
})
await wait(2000)

//check if download is actually paused
const downloadDirSize = await dirSize(tempFolder)
await wait(1000)
Expand Down Expand Up @@ -218,25 +218,25 @@ test.describe('hp store api tests', function () {
await cancelDownload(true)
})

// test('hp store: download, pause, resume, cancel and do not keep files', async () => {
// // download then pause
// console.log('installing')
// await withTimeout(installPartialTimeout, installPartial(appName), false)
// console.log('pausing')
// await pauseDownload()
// console.log('resuming')
// await resumeDownload()
// console.log('canceling')
// await cancelDownload(true)
// })

// test('hp store: download, pause, cancel and do not keep files', async () => {
// // download then pause
// console.log('installing')
// await withTimeout(installPartialTimeout, installPartial(appName), false)
// console.log('pausing')
// await pauseDownload()
// console.log('canceling')
// await cancelDownload(true)
// })
test('hp store: download, pause, resume, cancel and do not keep files', async () => {
// download then pause
console.log('installing')
await withTimeout(installPartialTimeout, installPartial(appName), false)
console.log('pausing')
await pauseDownload()
console.log('resuming')
await resumeDownload()
console.log('canceling')
await cancelDownload(true)
})

test('hp store: download, pause, cancel and do not keep files', async () => {
// download then pause
console.log('installing')
await withTimeout(installPartialTimeout, installPartial(appName), false)
console.log('pausing')
await pauseDownload()
console.log('canceling')
await cancelDownload(true)
})
})
Loading

0 comments on commit 2c249d1

Please sign in to comment.