Skip to content

Commit

Permalink
Merge pull request #74 from DanielKrawisz/master
Browse files Browse the repository at this point in the history
Master
  • Loading branch information
DanielKrawisz authored Sep 10, 2022
2 parents 22f5b4d + b2a5a37 commit 2a5b08e
Show file tree
Hide file tree
Showing 7 changed files with 1,262 additions and 1,046 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/commit-builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Data Builds
on:
push:
branches:
- '*'
- '*/*'
- '**'
- '!production'
env:
BUILD_TYPE: Debug
jobs:
prep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Conan
uses: turtlebrowser/[email protected]
- name: Cache Conan packages
uses: actions/cache@v3
id: cache-conan
env:
cache-name: cache-conan
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.py') }}
path: |
~/.conan/
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Create default profile
run: conan profile new default --detect
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Update profile 11
run: conan profile update settings.compiler.libcxx=libstdc++11 default
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Update profile version
run: conan profile update settings.compiler.version=10 default
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Add conan remote
run: |
conan config set general.revisions_enabled=True
conan remote add proofofwork https://conan.pow.co/artifactory/api/conan/conan
conan user -p ${{ secrets.CONAN_USER_KEY }} -r proofofwork github
test:
runs-on: ubuntu-latest
needs:
- prep
steps:
- uses: actions/checkout@v2
- name: Get Conan
uses: turtlebrowser/[email protected]
- name: Cache Conan packages
uses: actions/cache@v3
env:
cache-name: cache-conan
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.py') }}
path: |
~/.conan/
- name: run tests
run: |
mkdir test_build
cd test_build
conan install .. -r=proofofwork
cmake .. -DPACKAGE_TESTS=ON
cmake --build .
cd bin
for f in test*; do "./$f" ; done
upload:
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v2
- name: Get Conan
uses: turtlebrowser/[email protected]
- name: Cache Conan packages
uses: actions/cache@v3
env:
cache-name: cache-conan
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.py') }}
path: |
~/.conan/
- name: Run Conan
run: |
export CURRENT_VERSION=`git rev-parse --short HEAD`
conan install . -r proofofwork
conan create . proofofwork/unstable
conan upload data/${CURRENT_VERSION}@proofofwork/unstable -r proofofwork --all
38 changes: 0 additions & 38 deletions .github/workflows/conan.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/prcheck-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Test PR Builds
on:
pull_request:
branches:
- '*'
env:
BUILD_TYPE: Debug
jobs:
prep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Conan
uses: turtlebrowser/[email protected]
- name: Cache Conan packages
id: cache-conan
uses: actions/cache@v3
env:
cache-name: cache-conan-test
with:
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/conanfile.py') }}
path: |
~/.conan/
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Create default profile
run: conan profile new default --detect
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Update profile 11
run: conan profile update settings.compiler.libcxx=libstdc++11 default
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Update profile version
run: conan profile update settings.compiler.version=10 default
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Add conan remote
run: |
conan config set general.revisions_enabled=True
conan remote add proofofwork https://conan.pow.co/artifactory/api/conan/conan
test:
runs-on: ubuntu-latest
needs:
- prep
steps:
- uses: actions/checkout@v2
- name: Get Conan
uses: turtlebrowser/[email protected]
- name: Cache Conan packages
uses: actions/cache@v3
env:
cache-name: cache-conan-test
with:
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/conanfile.py') }}
path: |
~/.conan/
- name: run tests
run: |
mkdir test_build
cd test_build
conan install .. -r=proofofwork
cmake .. -DPACKAGE_TESTS=ON
cmake --build .
cd bin
for f in test*; do "./$f" ; done
108 changes: 108 additions & 0 deletions .github/workflows/stable-builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Stable Builds
on:
push:
branches:
- production
env:
BUILD_TYPE: Release
jobs:
prep:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- id: release
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: patch
use_github_release_notes: true
- name: Check Output Parameters
run: |
echo "Got tag name ${{ steps.release.outputs.tag_name }}"
echo "Got release version ${{ steps.release.outputs.version }}"
- uses: actions/checkout@v2
- name: Get Conan
uses: turtlebrowser/[email protected]
- name: Cache Conan packages
uses: actions/cache@v3
id: cache-conan
env:
cache-name: cache-conan
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.py') }}
path: |
~/.conan/
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Create default profile
run: conan profile new default --detect
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Update profile 11
run: conan profile update settings.compiler.libcxx=libstdc++11 default
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Update profile version
run: conan profile update settings.compiler.version=10 default
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Add conan remote
run: |
conan config set general.revisions_enabled=True
conan remote add proofofwork https://conan.pow.co/artifactory/api/conan/conan
conan user -p ${{ secrets.CONAN_USER_KEY }} -r proofofwork github
outputs:
releaseVersion: ${{ steps.release.outputs.tag_name }}
upload:
runs-on: ubuntu-latest
needs:
- prep
steps:
- uses: actions/checkout@v2
- name: Get Conan
uses: turtlebrowser/[email protected]
- name: Cache Conan packages
uses: actions/cache@v3
env:
cache-name: cache-conan
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.py') }}
path: |
~/.conan/
- name: Run Conan
run: |
export CURRENT_VERSION="${{ needs.prep.outputs.releaseVersion }}"
conan install . -r proofofwork
conan create . proofofwork/stable
conan upload data/${CURRENT_VERSION}@proofofwork/stable -r proofofwork --all
release:
runs-on: ubuntu-latest
needs:
- prep
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Get Conan
uses: turtlebrowser/[email protected]
- name: Cache Conan packages
uses: actions/cache@v3
env:
cache-name: cache-conan
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/conanfile.py') }}
path: |
~/.conan/
- name: prepare release package
run: |
mkdir build
cd build
conan install .. -r=proofofwork
cmake .. -DPACKAGE_TESTS=Off
cmake --build .
export CURRENT_VERSION="${{ needs.prep.outputs.releaseVersion }}"
cp -r ../include ./
tar -czvf "data-${CURRENT_VERSION}-linux.tar.gz" lib include
- name: Upload release
uses: svenstaro/upload-release-action@v2
with:
tag: ${{ needs.prep.outputs.releaseVersion }}
file: build/data-${{ needs.prep.outputs.releaseVersion }}-linux.tar.gz
asset_name: data-${{ needs.prep.outputs.releaseVersion }}-linux.tar.gz

57 changes: 0 additions & 57 deletions .github/workflows/stable.yml

This file was deleted.

Loading

0 comments on commit 2a5b08e

Please sign in to comment.