Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ak5k committed Jun 1, 2021
1 parent 46636a2 commit 7ca02e4
Show file tree
Hide file tree
Showing 3 changed files with 309 additions and 305 deletions.
132 changes: 66 additions & 66 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
schedule:
- cron: '38 6 15 * *'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# 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
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
schedule:
- cron: '38 6 15 * *'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# 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
224 changes: 112 additions & 112 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,112 +1,112 @@
# This is a basic workflow to help you get started with Actions

name: CMake Release

on:
push:
tags:
- 'v[0-9]+.*'

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
ARCHIVE_NAME: ${{ github.event.repository.name }}
COMPILER: ""

jobs:
create_release:
name: Create release
runs-on: ubuntu-latest
# Note this. We are going to use that in further jobs.
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
archive_tag: ${{ steps.vars.outputs.archive_tag }}
steps:
- name: set archive tag
id: vars
run: echo ::set-output name=archive_tag::${GITHUB_REF#refs/*/}
- name: check archive tag
env:
ARCHIVE_TAG: ${{ steps.vars.outputs.archive_tag }}
run: |
echo $ARCHIVE_TAG
echo ${{ steps.vars.outputs.archive_tag }}
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ReaBlink ${{ github.ref }}
draft: true
prerelease: false

# ...
release_assets:
name: Release assets
needs: create_release # we need to know the upload URL
runs-on: ${{ matrix.config.os }} # we run many different builds
strategy:
# just an example matrix
# fail-fast: false
matrix:
config:
- { os: windows-latest, arg1: '', arg2: "", arg3: "", arg4: "", arg5: ""}
- { os: windows-latest, arg1: '', arg2: "", arg3: "", arg4: "-A", arg5: "Win32" }
- { os: macos-latest, arg1: '', arg2: "-G", arg3: "Xcode", arg4: "-DCMAKE_OSX_ARCHITECTURES=\"arm64\"", arg5: '' }
- { os: macos-latest, arg1: '', arg2: "-G", arg3: "Xcode", arg4: "-DCMAKE_OSX_ARCHITECTURES=\"x86_64\"", arg5: '' }
- { os: macos-latest, arg1: '', arg2: "", arg3: "-DCMAKE_CXX_COMPILER=/usr/local/bin/g++-11", arg4: "-DCMAKE_CXX_COMPILER_ARG1=-m32", arg5: "-D LINUX_CROSS=\"i386\"" }
- { os: ubuntu-latest, arg1: '', arg2: "", arg3: "", arg4: "", arg5: "", linux_cross: ""}
- { os: ubuntu-latest, arg1: '', arg2: "", arg3: "", arg4: "", arg5: "-D LINUX_CROSS=\"aarch64\"", linux_cross: "aarch64" }
- { os: ubuntu-latest, arg1: '', arg2: "", arg3: "", arg4: "", arg5: "-D LINUX_CROSS=\"i686\"", linux_cross: "i686" }
- { os: ubuntu-latest, arg1: '', arg2: "", arg3: "", arg4: "", arg5: "-D LINUX_CROSS=\"armv7l\"", linux_cross: "arm", armarg: 'eabi' }

steps:
# checkout of cource
#- name: Checkout code
# uses: actions/checkout@v1
# ... whatever build and packaging steps you need here
# and finally do an upload!
- uses: actions/checkout@v2
with:
submodules: recursive

- if: ${{ runner.os == 'Linux' && matrix.config.linux_cross != '' }}
name: linux cross
run: |
sudo apt install -y g++-$ARCH-linux-gnu$ARG binutils-$ARCH-linux-gnu$ARG
echo "COMPILER=CXX=$ARCH-linux-gnu$ARG-g++" >> $GITHUB_ENV
env:
ARCH: ${{matrix.config.linux_cross}}
ARG: ${{matrix.config.armarg}}

- name: move wdl
run: mv ./vendor/WDL/WDL ./vendor/reaper-sdk/

- name: configure cmake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: ${{env.COMPILER}} cmake ${{matrix.config.arg2}} ${{matrix.config.arg3}} -B ${{github.workspace}}/build ${{matrix.config.arg4}} ${{matrix.config.arg5}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: build
# Build your program with the given configuration
run: ${{env.COMPILER}} cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: cpack
# run: ${{matrix.config.compress}} ${{matrix.config.arg1}} ${{github.event.repository.name}}-${{needs.create_release.outputs.archive_tag}}-${{matrix.config.os_name}}.zip ${{matrix.config.arg2}} ${{github.workspace}}/reaper_${{github.event.repository.name}}.${{matrix.config.ext}}${{matrix.config.arg3}}${{github.workspace}}/scripts
run: cpack --config ${{github.workspace}}/build/CPackConfig.cmake

- name: Upload release assets
#uses: actions/upload-release-asset@v1
shell: bash
run: |
set -x
assets=()
for asset in ./package/ReaBlink*; do
assets+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release edit "${assets[@]}" -m "" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This is a basic workflow to help you get started with Actions

name: CMake Release

on:
push:
tags:
- 'v[0-9]+.*'

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
ARCHIVE_NAME: ${{ github.event.repository.name }}
COMPILER: ""

jobs:
create_release:
name: Create release
runs-on: ubuntu-latest
# Note this. We are going to use that in further jobs.
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
archive_tag: ${{ steps.vars.outputs.archive_tag }}
steps:
- name: set archive tag
id: vars
run: echo ::set-output name=archive_tag::${GITHUB_REF#refs/*/}
- name: check archive tag
env:
ARCHIVE_TAG: ${{ steps.vars.outputs.archive_tag }}
run: |
echo $ARCHIVE_TAG
echo ${{ steps.vars.outputs.archive_tag }}
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ReaBlink ${{ github.ref }}
draft: true
prerelease: false

# ...
release_assets:
name: Release assets
needs: create_release # we need to know the upload URL
runs-on: ${{ matrix.config.os }} # we run many different builds
strategy:
# just an example matrix
# fail-fast: false
matrix:
config:
- { os: windows-latest, arg1: '', arg2: "", arg3: "", arg4: "", arg5: ""}
- { os: windows-latest, arg1: '', arg2: "", arg3: "", arg4: "-A", arg5: "Win32" }
- { os: macos-latest, arg1: '', arg2: "-G", arg3: "Xcode", arg4: "-DCMAKE_OSX_ARCHITECTURES=\"arm64\"", arg5: '' }
- { os: macos-latest, arg1: '', arg2: "-G", arg3: "Xcode", arg4: "-DCMAKE_OSX_ARCHITECTURES=\"x86_64\"", arg5: '' }
- { os: macos-latest, arg1: '', arg2: "", arg3: "-DCMAKE_CXX_COMPILER=/usr/local/bin/g++-11", arg4: "-DCMAKE_CXX_COMPILER_ARG1=-m32", arg5: "-D LINUX_CROSS=\"i386\"" }
- { os: ubuntu-latest, arg1: '', arg2: "", arg3: "", arg4: "", arg5: "", linux_cross: ""}
- { os: ubuntu-latest, arg1: '', arg2: "", arg3: "", arg4: "", arg5: "-D LINUX_CROSS=\"aarch64\"", linux_cross: "aarch64" }
- { os: ubuntu-latest, arg1: '', arg2: "", arg3: "", arg4: "", arg5: "-D LINUX_CROSS=\"i686\"", linux_cross: "i686" }
- { os: ubuntu-latest, arg1: '', arg2: "", arg3: "", arg4: "", arg5: "-D LINUX_CROSS=\"armv7l\"", linux_cross: "arm", armarg: 'eabi' }

steps:
# checkout of cource
#- name: Checkout code
# uses: actions/checkout@v1
# ... whatever build and packaging steps you need here
# and finally do an upload!
- uses: actions/checkout@v2
with:
submodules: recursive

- if: ${{ runner.os == 'Linux' && matrix.config.linux_cross != '' }}
name: linux cross
run: |
sudo apt install -y g++-$ARCH-linux-gnu$ARG binutils-$ARCH-linux-gnu$ARG
echo "COMPILER=CXX=$ARCH-linux-gnu$ARG-g++" >> $GITHUB_ENV
env:
ARCH: ${{matrix.config.linux_cross}}
ARG: ${{matrix.config.armarg}}

- name: move wdl
run: mv ./vendor/WDL/WDL ./vendor/reaper-sdk/

- name: configure cmake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: ${{env.COMPILER}} cmake ${{matrix.config.arg2}} ${{matrix.config.arg3}} -B ${{github.workspace}}/build ${{matrix.config.arg4}} ${{matrix.config.arg5}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: build
# Build your program with the given configuration
run: ${{env.COMPILER}} cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: cpack
# run: ${{matrix.config.compress}} ${{matrix.config.arg1}} ${{github.event.repository.name}}-${{needs.create_release.outputs.archive_tag}}-${{matrix.config.os_name}}.zip ${{matrix.config.arg2}} ${{github.workspace}}/reaper_${{github.event.repository.name}}.${{matrix.config.ext}}${{matrix.config.arg3}}${{github.workspace}}/scripts
run: cpack --config ${{github.workspace}}/build/CPackConfig.cmake

- name: Upload release assets
#uses: actions/upload-release-asset@v1
shell: bash
run: |
set -x
assets=()
for asset in ./package/ReaBlink*; do
assets+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release edit "${assets[@]}" -m "" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 7ca02e4

Please sign in to comment.