Skip to content

Commit

Permalink
initial commit (#1)
Browse files Browse the repository at this point in the history
initial commit
  • Loading branch information
ko-matsu authored Aug 21, 2020
1 parent b2d45aa commit e41aa48
Show file tree
Hide file tree
Showing 50 changed files with 14,187 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.sh text eol=lf
*.rs text eol=lf
*.yml text eol=lf
*.toml text eol=lf
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/Story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Story
about: Create a story

---

# Overview

<!-- TODO: ストーリーの概要を記述 -->

-

# Completion condition

<!-- TODO: ストーリーが完了したかどうかの判定を記述 -->

-
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/Task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Task
about: Create a task

---

# Overview

<!-- TODO: タスクの概要を記述 -->

-

# Sub tasks

<!-- TODO: タスクを実現するために、やるべきタスクと予定時間を記述 -->
<!-- 入力例: - [ ] 〇〇クラスに、△△の実装を追加する(1.5h -> h) -->
- [ ]

# Completion condition

<!-- TODO: タスクが完了したかどうかの判定を記述 -->

-
44 changes: 44 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Linked Issue

<!--
for linked ZenHub Issue or other repository issue.
- ZenHub's issue URL
- other repository's issue URL
-->

## Overview



## How to use

<!--
- How to check the operation
- For tasks that require operation confirmation, enter the required commands, etc.
- If not needed, leave blank
-->

```bash
```

## Items reserved this time, or TODO

<!--
- If not needed, leave blank
-->

## Check list

** Person who issued **
- [ ] checked script <!-- npm run check -->
- [ ] build successed
- [ ] Linked PullRequest and Issue

** Reviewer **
- [ ] (if necessary) Record the review results of related tickets.

## Memo

<!--
- Explain any considerations or considerations.
-->
36 changes: 36 additions & 0 deletions .github/workflows/check_pre-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: pre-merge check

on:
push:
branches:
- master
- develop
- features/sprint*
pull_request:
branches:
- master
- develop
- features/sprint*

jobs:
rust-test:
name: rust test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-20.04, ubuntu-18.04]

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/[email protected]
name: build
with:
command: build
- uses: actions-rs/[email protected]
name: test
with:
command: test
234 changes: 234 additions & 0 deletions .github/workflows/create_release-and-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
name: create-release-upload

on:
push:
tags:
- 'v*'

env:
CMAKE_VERSION: 3.17.2

jobs:
create-releases:
name: create-releases
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
- First Change
- Second Change
draft: false
prerelease: true
# continue-on-error: true
- name: write upload url
env:
url: ${{ steps.create_release.outputs.upload_url }}
run: |
echo $url > upload_url.txt
- name: upload artifact
uses: actions/upload-artifact@v1
with:
name: artifact-upload_url
path: upload_url.txt

upload-object-windows-vs2019:
name: upload-object-win-vs2019
needs: create-releases
runs-on: windows-latest
strategy:
matrix:
bin: [vs2019, vs2019-static]
include:
- bin: vs2019
shared: on
- bin: vs2019-static
shared: off

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: |
cd cfd-sys/cfd-cmake
mkdir dist
- name: cmake-build
run: |
cd cfd-sys/cfd-cmake
cmake -S . -B build
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_CAPI=on -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off --build build
cmake --build build --parallel 2 --config Release
cd ../..
timeout-minutes: 20
- name: cmake-install
run: |
cd cfd-sys/cfd-cmake
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
shell: cmd
- name: create archive file
run: |
cd cfd-sys/cfd-cmake
cd dist
Compress-Archive -Path ./* -DestinationPath ../cfd.zip
cd ..
echo "---- dump zip file ----"
dir .
- name: Upload Release Asset
id: upload-release-asset
# if: success()
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_url.outputs.upload_url }}
asset_path: ./cfd-sys/cfd-cmake/cfd.zip
asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-win-${{ matrix.bin }}-x86_64.zip
asset_content_type: application/zip

upload-object-ubuntu:
name: upload-object-ubuntu
needs: create-releases
runs-on: ubuntu-${{ matrix.os_ver }}.04
strategy:
matrix:
# os: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04]
os_ver: [20, 18, 16]
bin: [gcc, gcc-static]
include:
- bin: gcc
shared: on
- bin: gcc-static
shared: off

steps:
- name: checkout
uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: cmake-build
run: |
cd cfd-sys/cfd-cmake
mkdir dist
mkdir build
cd build
cmake .. -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off -DCMAKE_BUILD_TYPE=Release -DTARGET_RPATH="/usr/local/lib"
cd ..
cmake --build build --parallel 2 --config Release
cd build
sudo make install DESTDIR=../dist
cd ../../..
- name: create archive file
run: |
cd cfd-sys/cfd-cmake
cd dist
zip -r cfd.zip usr
echo "---- dump zip file ----"
ls -l
- name: download artifact
uses: actions/download-artifact@v1
with:
name: artifact-upload_url
- name: dump upload url
id: get_url
run: |
url=$(cat artifact-upload_url/upload_url.txt)
echo ::set-output name=upload_url::$url
- name: Upload Release Asset Ubuntu
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_url.outputs.upload_url }}
asset_path: ./cfd-sys/cfd-cmake/dist/cfd.zip
asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-ubuntu${{ matrix.os_ver }}04-${{ matrix.bin }}-x86_64.zip
asset_content_type: application/zip

upload-object-alpine:
name: upload-object-alpine
needs: create-releases
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: list
run: ls -a $GITHUB_WORKSPACE
- name: docker setup
uses: docker://alpine:3.10
with:
entrypoint: /github/workspace/.github/workflows/docker/alpine_build_entrypoint.sh
- name: create archive file
run: |
echo "---- dump output data ----"
ls -l $GITHUB_WORKSPACE/dist/usr/local/*
mkdir -p /tmp/cfd
sudo chmod 777 /tmp/cfd
sudo chown runner /tmp/cfd
sudo cp -r $GITHUB_WORKSPACE/dist/usr /tmp/cfd
cd /tmp/cfd
sudo zip -r /tmp/cfd/cfd.zip usr
sudo chmod 777 /tmp/cfd/cfd.zip
sudo chown runner /tmp/cfd/cfd.zip
sudo cp -rp /tmp/cfd/cfd.zip $GITHUB_WORKSPACE/dist/cfd.zip
echo "---- dump zip file ----"
sudo ls -l /tmp/cfd
- name: download artifact
uses: actions/download-artifact@v1
with:
name: artifact-upload_url
- name: dump upload url
id: get_url
run: |
url=$(cat artifact-upload_url/upload_url.txt)
echo ::set-output name=upload_url::$url
- name: Upload Release Asset
id: upload-release-asset
# if: success()
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_url.outputs.upload_url }}
asset_path: /tmp/cfd/cfd.zip
asset_name: cfd-sys-${{ steps.get_version.outputs.VERSION }}-alpine_x86_64.zip
asset_content_type: application/zip
19 changes: 19 additions & 0 deletions .github/workflows/docker/alpine_build_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh -l

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

cd /github/workspace
ls

mkdir dist
cd cfd-sys/cfd-cmake
mkdir build
cd build
cmake --version
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
make install DESTDIR=/github/workspace/dist
ls /github/workspace/dist
ls /github/workspace/dist/usr
ls /github/workspace/dist/usr/local
ls /github/workspace/dist/usr/local/lib64
Loading

0 comments on commit e41aa48

Please sign in to comment.