From 25b747b3b74d9845cfd9d3cd78c15a81af450b57 Mon Sep 17 00:00:00 2001 From: Russel Waters Date: Thu, 19 Nov 2020 09:40:49 -0800 Subject: [PATCH] Allow for manual triggering of artifact runs (#3054) --- .github/workflows/beta_artifacts.yml | 79 ++++++++++++-------- .github/workflows/live_artifacts.yml | 75 +++++++++++-------- .github/workflows/test_network_artifacts.yml | 73 ++++++++++-------- 3 files changed, 133 insertions(+), 94 deletions(-) diff --git a/.github/workflows/beta_artifacts.yml b/.github/workflows/beta_artifacts.yml index 1e18756c..5386a5c2 100644 --- a/.github/workflows/beta_artifacts.yml +++ b/.github/workflows/beta_artifacts.yml @@ -1,73 +1,85 @@ name: Beta - on: - push: - tags: - - V*RC* - - V*DB* + workflow_dispatch: + inputs: + repo: + description: "repo" + default: "nanocurrency/nano-node" + required: true + ref: + description: "tag to build" + default: "develop" + required: true env: BETA: 1 artifact: 1 - + jobs: osx_job: runs-on: macos-latest + timeout-minutes: 90 env: BOOST_ROOT: /tmp/boost steps: + - name: tag + run: | + echo "TAG=${{ github.event.inputs.ref }}" >> $GITHUB_ENV - uses: actions/checkout@5a4ac90 with: submodules: "recursive" - - uses: chrislennon/action-aws-cli@f0f8671 - - name: tag - run: | - TAG=`git describe --tags $GITHUB_SHA` - echo "TAG=$TAG" >> $GITHUB_ENV + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repo }} - name: Fetch Deps run: ci/actions/osx/install_deps.sh - name: Build Artifact - run: TRAVIS_TAG=${TAG} ci/build-deploy.sh "/tmp/qt/lib/cmake/Qt5"; + run: TRAVIS_TAG=${TAG} ci/build-deploy.sh "/tmp/qt/lib/cmake/Qt5"; - name: Deploy Artifact run: ci/actions/deploy.sh env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: us-east-2 - + linux_job: runs-on: ubuntu-18.04 + timeout-minutes: 90 steps: + - name: tag + run: | + echo "TAG=${{ github.event.inputs.ref }}" >> $GITHUB_ENV - uses: actions/checkout@5a4ac90 with: submodules: "recursive" - - uses: chrislennon/action-aws-cli@f0f8671 - - name: tag - run: | - TAG=`git describe --tags $GITHUB_SHA` - echo "TAG=$TAG" >> $GITHUB_ENV + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repo }} - name: Fetch Deps + env: + COMPILER: gcc run: ci/actions/linux/install_deps.sh - name: Build Artifact - run: docker run -v ${GITHUB_WORKSPACE}:/workspace nanocurrency/nano-env:gcc /bin/bash -c "cd /workspace && BETA=1 TRAVIS_TAG=${TAG} ci/build-deploy.sh /usr/lib/x86_64-linux-gnu/cmake/Qt5 ${PWD}" + run: docker run -v ${GITHUB_WORKSPACE}:/workspace nanocurrency/nano-env:gcc /bin/bash -c "cd /workspace && BETA=1 TRAVIS_TAG=${TAG} ci/build-deploy.sh /usr/lib/x86_64-linux-gnu/cmake/Qt5" - name: Deploy Artifact run: ci/actions/deploy.sh env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: us-east-2 - + AWS_DEFAULT_REGION: us-east-2 + linux_docker_job: runs-on: ubuntu-18.04 + timeout-minutes: 90 steps: + - name: tag + run: | + echo "TAG=${{ github.event.inputs.ref }}" >> $GITHUB_ENV - uses: actions/checkout@5a4ac90 with: submodules: "recursive" - - uses: chrislennon/action-aws-cli@f0f8671 - - name: tag - run: | - TAG=`git describe --tags $GITHUB_SHA` - echo "TAG=$TAG" >> $GITHUB_ENV + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repo }} - name: Fetch Deps + env: + COMPILER: gcc run: ci/actions/linux/install_deps.sh - name: Deploy Docker (nanocurrency/nano-beta) run: TRAVIS_TAG=${TAG} ci/actions/linux/deploy-docker.sh @@ -81,23 +93,24 @@ jobs: password: ${{ secrets.GHCR_PAT }} - name: Deploy Docker (ghcr.io) run: ci/actions/linux/ghcr_push.sh - + windows_job: runs-on: windows-latest + timeout-minutes: 90 steps: + - name: tag + run: | + Write-Output "TAG=${{ github.event.inputs.ref }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - uses: actions/checkout@5a4ac90 with: submodules: "recursive" - - uses: chrislennon/action-aws-cli@f0f8671 - - name: tag - run: | - $TAG=git describe --tags $GITHUB_SHA - echo "TAG=$TAG" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repo }} - name: Fetch Deps run: ci/actions/windows/install_deps.ps1 - name: Build Artifact run: ci/actions/windows/build.ps1 - env: + env: CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} - name: Deploy Artifact diff --git a/.github/workflows/live_artifacts.yml b/.github/workflows/live_artifacts.yml index 1d9ec111..6f368e9b 100644 --- a/.github/workflows/live_artifacts.yml +++ b/.github/workflows/live_artifacts.yml @@ -1,72 +1,84 @@ name: Live - on: - push: - tags-ignore: - - '*RC*' - - '*DB*' + workflow_dispatch: + inputs: + repo: + description: "repo" + default: "nanocurrency/nano-node" + required: true + ref: + description: "tag to build" + default: "develop" + required: true env: artifact: 1 jobs: osx_job: runs-on: macos-latest + timeout-minutes: 90 env: BOOST_ROOT: /tmp/boost steps: + - name: tag + run: | + echo "TAG=${{ github.event.inputs.ref }}" >> $GITHUB_ENV - uses: actions/checkout@5a4ac90 with: submodules: "recursive" - - uses: chrislennon/action-aws-cli@f0f8671 - - name: tag - run: | - TAG=`git describe --tags $GITHUB_SHA` - echo "TAG=$TAG" >> $GITHUB_ENV + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repo }} - name: Fetch Deps run: ci/actions/osx/install_deps.sh - name: Build Artifact - run: TRAVIS_TAG=${TAG} ci/build-deploy.sh "/tmp/qt/lib/cmake/Qt5"; + run: TRAVIS_TAG=${TAG} ci/build-deploy.sh "/tmp/qt/lib/cmake/Qt5"; - name: Deploy Artifact run: ci/actions/deploy.sh env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: us-east-2 - + linux_job: runs-on: ubuntu-18.04 + timeout-minutes: 90 steps: + - name: tag + run: | + echo "TAG=${{ github.event.inputs.ref }}" >> $GITHUB_ENV - uses: actions/checkout@5a4ac90 with: submodules: "recursive" - - uses: chrislennon/action-aws-cli@f0f8671 - - name: tag - run: | - TAG=`git describe --tags $GITHUB_SHA` - echo "TAG=$TAG" >> $GITHUB_ENV + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repo }} - name: Fetch Deps + env: + COMPILER: gcc run: ci/actions/linux/install_deps.sh - name: Build Artifact - run: docker run -v ${GITHUB_WORKSPACE}:/workspace nanocurrency/nano-env:gcc /bin/bash -c "cd /workspace && TRAVIS_TAG=${TAG} ci/build-deploy.sh /usr/lib/x86_64-linux-gnu/cmake/Qt5 ${PWD}" + run: docker run -v ${GITHUB_WORKSPACE}:/workspace nanocurrency/nano-env:gcc /bin/bash -c "cd /workspace && TRAVIS_TAG=${TAG} ci/build-deploy.sh /usr/lib/x86_64-linux-gnu/cmake/Qt5" - name: Deploy Artifact run: ci/actions/deploy.sh env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: us-east-2 + AWS_DEFAULT_REGION: us-east-2 linux_docker_job: runs-on: ubuntu-18.04 + timeout-minutes: 90 steps: + - name: tag + run: | + echo "TAG=${{ github.event.inputs.ref }}" >> $GITHUB_ENV - uses: actions/checkout@5a4ac90 with: submodules: "recursive" - - uses: chrislennon/action-aws-cli@f0f8671 - - name: tag - run: | - TAG=`git describe --tags $GITHUB_SHA` - echo "TAG=$TAG" >> $GITHUB_ENV + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repo }} - name: Fetch Deps + env: + COMPILER: gcc run: ci/actions/linux/install_deps.sh - name: Deploy Docker (nanocurrency/nano) run: TRAVIS_TAG=${TAG} ci/actions/linux/deploy-docker.sh @@ -80,23 +92,24 @@ jobs: password: ${{ secrets.GHCR_PAT }} - name: Deploy Docker (ghcr.io run: ci/actions/linux/ghcr_push.sh - + windows_job: runs-on: windows-latest + timeout-minutes: 90 steps: + - name: tag + run: | + Write-Output "TAG=${{ github.event.inputs.ref }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - uses: actions/checkout@5a4ac90 with: submodules: "recursive" - - uses: chrislennon/action-aws-cli@f0f8671 - - name: tag - run: | - $TAG=git describe --tags $GITHUB_SHA - echo "TAG=$TAG" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repo }} - name: Fetch Deps run: ci/actions/windows/install_deps.ps1 - name: Build Artifact run: ci/actions/windows/build.ps1 - env: + env: CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} - name: Deploy Artifact diff --git a/.github/workflows/test_network_artifacts.yml b/.github/workflows/test_network_artifacts.yml index 81cd1813..49a90d74 100644 --- a/.github/workflows/test_network_artifacts.yml +++ b/.github/workflows/test_network_artifacts.yml @@ -1,9 +1,15 @@ name: Test - on: - push: - tags-ignore: - - '*DB*' + workflow_dispatch: + inputs: + repo: + description: "repo" + default: "nanocurrency/nano-node" + required: true + ref: + description: "tag to build" + default: "develop" + required: true env: artifact: 1 TEST: 1 @@ -11,62 +17,69 @@ env: jobs: osx_job: runs-on: macos-latest + timeout-minutes: 90 env: BOOST_ROOT: /tmp/boost steps: + - name: tag + run: | + echo "TAG=${{ github.event.inputs.ref }}" >> $GITHUB_ENV - uses: actions/checkout@5a4ac90 with: submodules: "recursive" - - uses: chrislennon/action-aws-cli@f0f8671 - - name: tag - run: | - TAG=`git describe --tags $GITHUB_SHA` - echo "TAG=$TAG" >> $GITHUB_ENV + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repo }} - name: Fetch Deps run: ci/actions/osx/install_deps.sh - name: Build Artifact - run: TRAVIS_TAG=${TAG} ci/build-deploy.sh "/tmp/qt/lib/cmake/Qt5"; + run: TRAVIS_TAG=${TAG} ci/build-deploy.sh "/tmp/qt/lib/cmake/Qt5"; - name: Deploy Artifact run: ci/actions/deploy.sh env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: us-east-2 - + linux_job: runs-on: ubuntu-18.04 + timeout-minutes: 90 steps: + - name: tag + run: | + echo "TAG=${{ github.event.inputs.ref }}" >> $GITHUB_ENV - uses: actions/checkout@5a4ac90 with: submodules: "recursive" - - uses: chrislennon/action-aws-cli@f0f8671 - - name: tag - run: | - TAG=`git describe --tags $GITHUB_SHA` - echo "TAG=$TAG" >> $GITHUB_ENV + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repo }} - name: Fetch Deps + env: + COMPILER: gcc run: ci/actions/linux/install_deps.sh - name: Build Artifact - run: docker run -e TEST -v ${GITHUB_WORKSPACE}:/workspace nanocurrency/nano-env:gcc /bin/bash -c "cd /workspace && TRAVIS_TAG=${TAG} ci/build-deploy.sh /usr/lib/x86_64-linux-gnu/cmake/Qt5 ${PWD}" + run: docker run -e TEST -v ${GITHUB_WORKSPACE}:/workspace nanocurrency/nano-env:gcc /bin/bash -c "cd /workspace && TRAVIS_TAG=${TAG} ci/build-deploy.sh /usr/lib/x86_64-linux-gnu/cmake/Qt5" - name: Deploy Artifact run: ci/actions/deploy.sh env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: us-east-2 + AWS_DEFAULT_REGION: us-east-2 linux_docker_job: runs-on: ubuntu-18.04 + timeout-minutes: 90 steps: + - name: tag + run: | + echo "TAG=${{ github.event.inputs.ref }}" >> $GITHUB_ENV - uses: actions/checkout@5a4ac90 with: submodules: "recursive" - - uses: chrislennon/action-aws-cli@f0f8671 - - name: tag - run: | - TAG=`git describe --tags $GITHUB_SHA` - echo "TAG=$TAG" >> $GITHUB_ENV + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repo }} - name: Fetch Deps + env: + COMPILER: gcc run: ci/actions/linux/install_deps.sh - name: Deploy Docker (nanocurrency/nano) run: TRAVIS_TAG=${TAG} ci/actions/linux/deploy-docker.sh @@ -83,21 +96,21 @@ jobs: windows_job: runs-on: windows-latest + timeout-minutes: 90 steps: + - name: tag + run: | + Write-Output "TAG=${{ github.event.inputs.ref }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - uses: actions/checkout@5a4ac90 with: submodules: "recursive" - - uses: chrislennon/action-aws-cli@f0f8671 - - name: tag - run: | - $TAG=git describe --tags $GITHUB_SHA - echo "TAG=$TAG" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repo }} - name: Fetch Deps run: ci/actions/windows/install_deps.ps1 - name: Build Artifact run: ci/actions/windows/build.ps1 - env: + env: CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} - name: Deploy Artifact