Skip to content

Commit

Permalink
update to v0.2.0 (#18)
Browse files Browse the repository at this point in the history
update from cryptogarageinc/cfd-js v0.2.7 (#18)
  • Loading branch information
k-matsuzawa authored Oct 28, 2020
1 parent 67f13c4 commit 127721d
Show file tree
Hide file tree
Showing 173 changed files with 50,777 additions and 29,581 deletions.
106 changes: 106 additions & 0 deletions .github/workflows/code_scanner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
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: ['cpp', 'javascript']
# 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

OSSAR-Scan:
# OSSAR runs on windows-latest.
# ubuntu-latest and macos-latest support coming soon
runs-on: windows-latest

steps:
# Checkout your code repository to scan
- 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' }}

# Ensure a compatible version of dotnet is installed.
# The [Microsoft Security Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201.
# A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action.
# GitHub hosted runners already have a compatible version of dotnet installed and this step may be skipped.
# For self-hosted runners, ensure dotnet version 3.1.201 or later is installed by including this action:
# - name: Install .NET
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: '3.1.x'

# Run open source static analysis tools
- name: Run OSSAR
uses: github/ossar-action@v1
id: ossar

# Upload results to the Security tab
- name: Upload OSSAR results
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: ${{ steps.ossar.outputs.sarifFile }}
52 changes: 18 additions & 34 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.15.5

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 @@ -38,37 +37,29 @@ 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-vs2019:
name: upload-object-win-vs2019
needs: create-releases
needs: create_releases
runs-on: windows-latest

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 @@ -128,7 +119,7 @@ jobs:

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

steps:
Expand Down Expand Up @@ -164,16 +155,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: |
export up_url="$(cat artifact-upload_url/upload_url.txt)"
echo "::set-output name=upload_url::$up_url"
echo "url=$up_url"
run: echo "::set-output name=upload_url::${{ needs.create_releases.outputs.release_url }}"
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
Expand Down
Loading

0 comments on commit 127721d

Please sign in to comment.