Skip to content

Commit

Permalink
update to v0.2.0
Browse files Browse the repository at this point in the history
update from cryptogarageinc/cfd-go v0.2.4 (#14)
  • Loading branch information
k-matsuzawa authored Oct 28, 2020
1 parent c820cb7 commit da05723
Show file tree
Hide file tree
Showing 8 changed files with 2,357 additions and 1,427 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/code_scanner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: code scan

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

jobs:
analyze-CodeQL:
name: CodeQL
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['go', 'cpp']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# https://git.io/JvXDl

# ️ If the Autobuild fails above, remove it and uncomment the following three lines and modify them (or add more) to build your code if your project uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
90 changes: 30 additions & 60 deletions .github/workflows/create_release-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ on:
tags:
- 'v*'

env:
CMAKE_VERSION: 3.17.2

jobs:
create-releases:
create_releases:
name: create-releases
runs-on: ubuntu-latest
outputs:
release_url: ${{ steps.output_url.outputs.upload_url }}

steps:
- name: checkout
Expand All @@ -30,23 +29,24 @@ jobs:
- Second Change
draft: false
prerelease: true
# continue-on-error: true
- name: write upload url
continue-on-error: true
- name: Get release
if: steps.create_release.outcome == 'failure'
id: get_release
uses: bruceadams/[email protected]
env:
url: ${{ steps.create_release.outputs.upload_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: output url
id: output_url
run: |
echo $url > upload_url.txt
- name: upload artifact
uses: actions/upload-artifact@v1
with:
name: artifact-upload_url
path: upload_url.txt
echo "::set-output name=upload_url::${{steps.get_release.outputs.upload_url}}${{steps.create_release.outputs.upload_url}}"
upload-object-windows-mingw:
name: upload-object-win-mingw
needs: create-releases
needs: create_releases
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
bin: [gcc, gcc-static]
include:
Expand All @@ -60,17 +60,9 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2
- name: download artifact
uses: actions/download-artifact@v1
with:
name: artifact-upload_url
- name: dump upload url
- name: output 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
run: echo "::set-output name=upload_url::${{ needs.create_releases.outputs.release_url }}"
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
Expand Down Expand Up @@ -118,9 +110,10 @@ jobs:

upload-object-ubuntu:
name: upload-object-ubuntu
needs: create-releases
needs: create_releases
runs-on: ubuntu-${{ matrix.os_ver }}.04
strategy:
fail-fast: false
matrix:
# os: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04]
os_ver: [20, 18, 16]
Expand Down Expand Up @@ -159,15 +152,9 @@ jobs:
run: |
sudo unzip -q ./dist/cfd.zip -d /
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" go test
- name: download artifact
uses: actions/download-artifact@v1
with:
name: artifact-upload_url
- name: dump upload url
- name: output url
id: get_url
run: |
url=$(cat artifact-upload_url/upload_url.txt)
echo ::set-output name=upload_url::$url
run: echo "::set-output name=upload_url::${{ needs.create_releases.outputs.release_url }}"
- name: Upload Release Asset
uses: actions/[email protected]
env:
Expand All @@ -180,7 +167,7 @@ jobs:

upload-object-alpine-3-10:
name: upload-object-alpine-3.10
needs: create-releases
needs: create_releases
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -214,15 +201,9 @@ jobs:
uses: docker://golang:1.13-alpine
with:
entrypoint: /github/workspace/.github/workflows/docker/alpine_test_entrypoint.sh
- name: download artifact
uses: actions/download-artifact@v1
with:
name: artifact-upload_url
- name: dump upload url
- name: output url
id: get_url
run: |
url=$(cat artifact-upload_url/upload_url.txt)
echo ::set-output name=upload_url::$url
run: echo "::set-output name=upload_url::${{ needs.create_releases.outputs.release_url }}"
- name: Upload Release Asset
id: upload-release-asset
# if: success()
Expand All @@ -237,7 +218,7 @@ jobs:

upload-object-alpine-3-12:
name: upload-object-alpine-3.12
needs: create-releases
needs: create_releases
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -271,15 +252,9 @@ jobs:
uses: docker://golang:1.15-alpine
with:
entrypoint: /github/workspace/.github/workflows/docker/alpine_test_entrypoint.sh
- name: download artifact
uses: actions/download-artifact@v1
with:
name: artifact-upload_url
- name: dump upload url
- name: output url
id: get_url
run: |
url=$(cat artifact-upload_url/upload_url.txt)
echo ::set-output name=upload_url::$url
run: echo "::set-output name=upload_url::${{ needs.create_releases.outputs.release_url }}"
- name: Upload Release Asset
id: upload-release-asset
# if: success()
Expand All @@ -294,9 +269,10 @@ jobs:

upload-object-macos:
name: upload-object-macos
needs: create-releases
needs: create_releases
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
xcode: [10.3, 11.6]
shared: [on, off]
Expand Down Expand Up @@ -334,15 +310,9 @@ jobs:
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
- name: output url
id: get_url
run: |
url=$(cat artifact-upload_url/upload_url.txt)
echo ::set-output name=upload_url::$url
run: echo "::set-output name=upload_url::${{ needs.create_releases.outputs.release_url }}"
- name: Upload Release Asset
uses: actions/[email protected]
env:
Expand Down
Loading

0 comments on commit da05723

Please sign in to comment.