Skip to content

feat: BCH Network Upgrade 2024 #70

feat: BCH Network Upgrade 2024

feat: BCH Network Upgrade 2024 #70

Workflow file for this run

name: .NET
# on:
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]
on: [push, pull_request]
jobs:
build:
# runs-on: windows-2022
# runs-on: windows-latest
# runs-on: windows-2019
# runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Fetch history
# run: git fetch --prune --unshallow
run: git fetch --unshallow
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
# dotnet-version: 3.1.x
# dotnet-version: 5.0.x
# dotnet-version: 6.0.x
dotnet-version: 8.0.x
- uses: actions/setup-python@v5
with:
python-version: "3.12"
# - "python --version"
# - python -m pip install --upgrade pip
# - "%PYTHON%/Scripts/pip.exe install kthbuild --upgrade"
- name: Install Dependencies (Unix)
run: |
python --version
cmake --version
pip install --upgrade pip
pip install kthbuild --upgrade
conan --version
pip install conan --upgrade
conan --version
shell: bash
- name: Pre-Compile
run: |
conan config install https://github.com/k-nuth/ci-utils/raw/master/conan/config2023.zip
conan config install https://github.com/k-nuth/ci-utils/raw/master/conan/config2023.zip
conan remote add kth https://packages.kth.cash/api
# conan profile list
# conan profile detect
# conan profile show default
# conan profile update settings.compiler.libcxx=libstdc++11 default
# conan profile show default
conan install --requires=c-api/0.48.0 --update -o c-api/*:shared=True
shell: bash
- name: Compile
run: ./build.sh Compile
shell: bash
- name: Test
run: |
pwd
find . -name "*kth-c-api*"
./build.sh Test
shell: bash
- name: Pack
run: ./build.sh Pack
shell: bash
- name: Push
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GHA_COMMIT_MSG: ${{ github.event.head_commit.message }}
PUBLISH_TO_NUGET: "true"
run: |
# Write-Host "NUGET_API_KEY: $Env:NUGET_API_KEY"
# Write-Host "GHA_COMMIT_MSG: $Env:GHA_COMMIT_MSG"
echo "NUGET_API_KEY: ${NUGET_API_KEY}"
echo "GHA_COMMIT_MSG: ${GHA_COMMIT_MSG}"
# $Env:GHA_BRANCH = "${{ github.ref }}".Split("/")[2]
# Write-Host "My branch name is $Env:GHA_BRANCH"
# ./build.sh Push --NugetApiUrl "https://api.nuget.org/v3/index.json" --NugetApiKey $env:NUGET_API_KEY
export GHA_BRANCH=$(echo '${{ github.ref }}' | awk -F '/' '{print $3}')
echo "My branch name is $GHA_BRANCH"
./build.sh Push --NugetApiUrl "https://api.nuget.org/v3/index.json" --NugetApiKey $NUGET_API_KEY
shell: bash
# - name: Restore dependencies
# run: dotnet restore
# - name: Build
# run: dotnet build --no-restore
# - name: Test
# run: dotnet test --no-build --verbosity normal