Skip to content

Commit

Permalink
update to v0.1.2 (#9)
Browse files Browse the repository at this point in the history
Co-authored-by: k-matsuzawa <matsuzawa@cryptogarage.co.jp>
  • Loading branch information
ko-matsu and k-matsuzawa authored Jun 8, 2020
1 parent 78fdbf5 commit 3e1a78f
Show file tree
Hide file tree
Showing 12 changed files with 1,228 additions and 793 deletions.
92 changes: 89 additions & 3 deletions .github/workflows/create_release-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,81 @@ jobs:
name: artifact-upload_url
path: upload_url.txt

upload-object-windows-mingw:
name: upload-object-win-mingw
needs: create-releases
runs-on: windows-latest
strategy:
matrix:
bin: [gcc, gcc-static]

steps:
- name: checkout
uses: actions/checkout@v2
- name: download artifact
uses: actions/download-artifact@v1
with:
name: artifact-upload_url
- name: dump upload url
id: get_url
run: |
export up_url="$(cat artifact-upload_url/upload_url.txt)"
echo "::set-output name=upload_url::$up_url"
echo "url=$up_url"
shell: bash
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
shell: bash
- name: dump version
env:
version: ${{ steps.get_version.outputs.VERSION }}
run: echo "version=${version}"
shell: bash
- name: create folder
run: mkdir dist
- name: cmake-configure
if: matrix.bin != 'gcc-static'
run: |
cmake -S . -B build -G "MSYS Makefiles"
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=on -DENABLE_CAPI=on -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off --build build
- name: cmake-configure static
if: matrix.bin == 'gcc-static'
run: |
cmake -S . -B build -G "MSYS Makefiles"
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=off -DENABLE_CAPI=on -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off --build build
- name: cmake-build
run: |
cmake --build build --parallel 2 --config Release
timeout-minutes: 20
- name: cmake-install
shell: cmd
run: |
cmake -DCMAKE_INSTALL_PREFIX="./dist" --install build
cmake --install build
cd dist
del /F /Q cmake\wallycore-*
del /F /Q lib\wallycore.*
del /F /Q lib\libwallycore.*
del /F /Q lib\pkgconfig\wallycore.pc
- name: create archive file
run: |
cd dist
Compress-Archive -Path ./* -DestinationPath ../cfd.zip
cd ..
echo "---- dump zip file ----"
dir .
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_url.outputs.upload_url }}
asset_path: ./cfd.zip
asset_name: cfdgo-${{ steps.get_version.outputs.VERSION }}-win-${{ matrix.bin }}-x86_64.zip
asset_content_type: application/zip

upload-object-alpine:
name: upload-object-alpine
needs: create-releases
Expand Down Expand Up @@ -106,6 +181,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-16.04]
bin: [gcc, gcc-static]

steps:
- name: checkout
Expand Down Expand Up @@ -138,7 +214,7 @@ jobs:
echo ::add-path::$CURRENT_DIR/$cmake_file_name/bin
cd ../..
- name: cmake-build
id: cmake_build
if: matrix.bin != 'gcc-static'
run: |
mkdir dist
mkdir build
Expand All @@ -147,6 +223,16 @@ jobs:
make
sudo make install DESTDIR=../dist
cd ..
- name: cmake-build static
if: matrix.bin == 'gcc-static'
run: |
mkdir dist
mkdir build
cd build
cmake .. -DENABLE_SHARED=off -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off -DCMAKE_BUILD_TYPE=Release -DTARGET_RPATH="/usr/local/lib"
make
sudo make install DESTDIR=../dist
cd ..
- name: create archive file
run: |
cd dist
Expand Down Expand Up @@ -174,7 +260,7 @@ jobs:
with:
upload_url: ${{ steps.get_url.outputs.upload_url }}
asset_path: ./dist/cfd.zip
asset_name: cfdgo-${{ steps.get_version.outputs.VERSION }}-ubuntu1804-gcc-x86_64.zip
asset_name: cfdgo-${{ steps.get_version.outputs.VERSION }}-ubuntu1804-${{ matrix.bin }}-x86_64.zip
asset_content_type: application/zip
- name: Upload Release Asset Ubuntu-16.04
if: matrix.os == 'ubuntu-16.04'
Expand All @@ -184,7 +270,7 @@ jobs:
with:
upload_url: ${{ steps.get_url.outputs.upload_url }}
asset_path: ./dist/cfd.zip
asset_name: cfdgo-${{ steps.get_version.outputs.VERSION }}-ubuntu1604-gcc-x86_64.zip
asset_name: cfdgo-${{ steps.get_version.outputs.VERSION }}-ubuntu1604-${{ matrix.bin }}-x86_64.zip
asset_content_type: application/zip
- name: ubuntu-after
run: rm -rf cache/cmake/cmake-$CMAKE_VERSION-Linux-x86_64
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ cmake version is 3.15 or higher: `cmake --install build`
sudo ./tools/cleanup_install_files.sh

(download)
wget https://github.com/p2pderivatives/cfd-go/releases/download/v0.1.0/cfdgo-v0.1.0-ubuntu1804-gcc-x86_64.zip
wget https://github.com/p2pderivatives/cfd-go/releases/download/v0.1.2/cfdgo-v0.1.2-ubuntu1804-gcc-x86_64.zip

(unzip)
sudo unzip -q cfdgo-v0.1.0-ubuntu1804-gcc-x86_64.zip -d /
sudo unzip -q cfdgo-v0.1.2-ubuntu1804-gcc-x86_64.zip -d /
```

### uninstall
Expand All @@ -188,7 +188,7 @@ go.mod

```
require (
github.com/p2pderivatives/cfd-go v0.1.0
github.com/p2pderivatives/cfd-go v0.1.2
...
)
```
Expand Down Expand Up @@ -270,3 +270,34 @@ set CFD_CMAKE_GIT_SSH=1
```
export CFD_CMAKE_GIT_SSH=1
```

### Ignore git update for CMake External Project:

Depending on your git environment, you may get the following error when checking out external:
```
Performing update step for 'libwally-core-download'
Current branch cmake_build is up to date.
No stash entries found.
No stash entries found.
No stash entries found.
CMake Error at /workspace/cfd-core/build/external/libwally-core/download/libwally-core-download-prefix/tmp/libwally-core-download-gitupdate.cmake:133 (message):
Failed to unstash changes in:
'/workspace/cfd-core/external/libwally-core/'.
You will have to resolve the conflicts manually
```

This phenomenon is due to the `git update` related command.
Please set an environment variable that skips update processing.

- Windows: (On the command line. Or set from the system setting screen.)
```
set CFD_CMAKE_GIT_SKIP_UPDATE=1
```

- MacOS & Linux(Ubuntu):
```
export CFD_CMAKE_GIT_SKIP_UPDATE=1
```
4 changes: 2 additions & 2 deletions build.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM alpine:3.10

WORKDIR /workspace

ARG CFDGO_VER=v0.0.5
ARG CFDGO_VER=v0.1.2

RUN apk add --update --no-cache musl gcc g++ make git cmake

Expand All @@ -11,7 +11,7 @@ RUN git clone https://github.com/p2pderivatives/cfd-go.git \
&& git checkout refs/tags/$CFDGO_VER \
&& mkdir build \
&& cd build \
&& cmake .. -DENABLE_SHARED=on -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off -DENABLE_CAPI=on -DTARGET_RPATH=/usr/local/lib/ \
&& cmake .. -DENABLE_SHARED=on -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off -DENABLE_CAPI=on -DTARGET_RPATH=/usr/local/lib:/usr/local/lib64 \
&& make

RUN mkdir /workspace/dist \
Expand Down
Loading

0 comments on commit 3e1a78f

Please sign in to comment.