From a195aad4b449638ab13db83686ad25c06c44be06 Mon Sep 17 00:00:00 2001 From: Alexey Shokov Date: Tue, 16 Mar 2021 16:36:38 +0000 Subject: [PATCH 1/2] WIP on build-release CI pipeline --- .github/workflows/build-linux.yml | 32 ++++++++++ .github/workflows/build-osx.yml | 32 ++++++++++ .github/workflows/build-release.yml | 96 ----------------------------- .github/workflows/build-windows.yml | 47 ++++++++++++++ README.md | 7 +-- 5 files changed, 112 insertions(+), 102 deletions(-) create mode 100644 .github/workflows/build-linux.yml create mode 100644 .github/workflows/build-osx.yml delete mode 100644 .github/workflows/build-release.yml create mode 100644 .github/workflows/build-windows.yml diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml new file mode 100644 index 0000000..5d45746 --- /dev/null +++ b/.github/workflows/build-linux.yml @@ -0,0 +1,32 @@ +name: Linux Build +on: push +jobs: + linux-build: + needs: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v2 + with: + node-version: '14' + - run: | + node --version + yarn --version + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Build + run: ./build-linux.sh + +# TODO Upload artifacts + - uses: actions/upload-artifact@v2 + with: + name: linux-build + path: # FIXME diff --git a/.github/workflows/build-osx.yml b/.github/workflows/build-osx.yml new file mode 100644 index 0000000..e36723d --- /dev/null +++ b/.github/workflows/build-osx.yml @@ -0,0 +1,32 @@ +name: OS X Build +on: push +jobs: + osx-build: + needs: release + runs-on: macos-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v2 + with: + node-version: '14' + - run: | + node --version + yarn --version + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Build + run: ./build-osx.sh + +# TODO Upload artifacts + - uses: actions/upload-artifact@v2 + with: + name: osx-build + path: # FIXME diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml deleted file mode 100644 index ebc3357..0000000 --- a/.github/workflows/build-release.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: Release -on: - push: - tags: - - v* -jobs: - release: - runs-on: ubuntu-latest - steps: - - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: ${{ github.ref }} release, see the changelog for more details. - draft: false - prerelease: false - linux-build: - needs: release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v2 - with: - node-version: '12' - - run: | - node --version - yarn --version - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Build - run: | - yarn install - pushd ccurl - rm mac/libccurl.dylib - rm lin64/libccurl.so - gcc -shared -o libccurl.so libccurl.cpp -O3 -lpthread -fPIC -std=c++11 - mkdir -p lin64 - cp libccurl.so lin64/ - rm libccurl.so - popd - yarn run publish:lin - find out - # TODO Upload release asset - osx-build: - needs: release - runs-on: macos-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v2 - with: - node-version: '12' - - run: | - node --version - yarn --version - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Build - run: | - yarn install - pushd ccurl - rm mac/libccurl.dylib - rm lin64/libccurl.so - gcc -dynamiclib -o libccurl.dylib libccurl.cpp -O3 -lpthread -std=c++11 - mkdir -p mac - cp libccurl.dylib mac/ - rm libccurl.dylib - popd - yarn run publish:mac - find out - # TODO Upload release asset - windows-build: - needs: release - runs-on: windows-latest - steps: - - uses: actions/checkout@v1 - # TODO Implement - # TODO Upload release asset diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000..1e18b17 --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,47 @@ +name: Windows Build +on: push +jobs: + windows-build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v2 + with: + node-version: '14' + architecture: 'x64' + - run: | + node --version + yarn --version + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: | + yarn install + cd ccurl + call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" + cl libccurl.cpp /LD /Ox + if not exist "win64" mkdir win64 + copy libccurl.dll win64\ + del libccurl.dll + call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat" + cl libccurl.cpp /LD /Ox + if not exist "win32" mkdir win32 + copy libccurl.dll win32\ + del libccurl.dll + cd .. + - run: | + yarn compile:win + tree /f out + +# TODO Upload artifacts + - uses: actions/upload-artifact@v2 + with: + name: windows-build + path: # FIXME diff --git a/README.md b/README.md index bf5dd15..c07297f 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,9 @@
-
This repository contains the desktop wallet for Aidos Kuneen.
+
This repository contains the desktop wallet for Aidos Kuneen

- - Travis - - Appveyor License From 7141b9d8ba7cbb83add16eeb412e74cd4e736fa3 Mon Sep 17 00:00:00 2001 From: Alexey Shokov Date: Tue, 30 Mar 2021 19:32:45 +0000 Subject: [PATCH 2/2] WIP on the build fixes --- .github/workflows/build-linux.yml | 4 +--- .github/workflows/build-osx.yml | 4 +--- .github/workflows/build-windows.yml | 4 +--- .gitignore | 15 ++++++++------- build-linux.sh | 16 ++++++++++++++++ build-osx.sh | 16 ++++++++++++++++ 6 files changed, 43 insertions(+), 16 deletions(-) create mode 100755 build-linux.sh create mode 100755 build-osx.sh diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 5d45746..1d9455b 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -24,9 +24,7 @@ jobs: ${{ runner.os }}-yarn- - name: Build run: ./build-linux.sh - -# TODO Upload artifacts - uses: actions/upload-artifact@v2 with: name: linux-build - path: # FIXME + path: out/linux diff --git a/.github/workflows/build-osx.yml b/.github/workflows/build-osx.yml index e36723d..c5876ad 100644 --- a/.github/workflows/build-osx.yml +++ b/.github/workflows/build-osx.yml @@ -24,9 +24,7 @@ jobs: ${{ runner.os }}-yarn- - name: Build run: ./build-osx.sh - -# TODO Upload artifacts - uses: actions/upload-artifact@v2 with: name: osx-build - path: # FIXME + path: out/mac diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 1e18b17..000c960 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -39,9 +39,7 @@ jobs: - run: | yarn compile:win tree /f out - -# TODO Upload artifacts - uses: actions/upload-artifact@v2 with: name: windows-build - path: # FIXME + path: out/win diff --git a/.gitignore b/.gitignore index 9798e77..ec3f142 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,10 @@ -node_modules -app/bower_components -ui/bower_components -npm-debug.log -ari/* -out/* +/app/bower_components +/ari +/node_modules +/out +/ui/bower_components +/*.pfx +.project aidos -/.project +npm-debug.log yarn-error.log diff --git a/build-linux.sh b/build-linux.sh new file mode 100755 index 0000000..d30df87 --- /dev/null +++ b/build-linux.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -e +set -x + +yarn install +pushd ccurl || exit +rm mac/libccurl.dylib || true +rm lin64/libccurl.so || true +gcc -shared -o libccurl.so libccurl.cpp -O3 -lpthread -fPIC -std=c++11 +mkdir -p lin64 +cp libccurl.so lin64/ +rm libccurl.so +popd || exit +yarn run compile:lin +find out diff --git a/build-osx.sh b/build-osx.sh new file mode 100755 index 0000000..2d9d304 --- /dev/null +++ b/build-osx.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -e +set -x + +yarn install +pushd ccurl || exit +rm mac/libccurl.dylib || true +rm lin64/libccurl.so || true +gcc -dynamiclib -o libccurl.dylib libccurl.cpp -O3 -lpthread -std=c++11 +mkdir -p mac +cp libccurl.dylib mac/ +rm libccurl.dylib +popd || exit +yarn run compile:mac +find out