Skip to content

multiplier_refactor #205

multiplier_refactor

multiplier_refactor #205

Workflow file for this run

name: Post PR
on:
pull_request:
types: [closed]
env:
USER: runner
jobs:
gen-matrix:
name: Generate test matrix
if: github.event.pull_request.merged == true
runs-on: [self-hosted, linux]
env:
RUNNERS: 8
outputs:
ci-tests: ${{ steps.ci-tests.outputs.matrix }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- run: sudo -E .github/setup-actions.sh
env:
AWS_CREDENTIALS: ${{secrets.AWS_CREDENTIALS}}
CACHE_PRIV_KEY: ${{secrets.CACHE_PRIV_KEY}}
CACHE_DOMAIN: ${{secrets.CACHE_DOMAIN}}
ROCKETCHIP_NIX_REMOTE_SSH_PRIVKEY: ${{secrets.ROCKETCHIP_NIX_REMOTE_SSH_PRIVKEY}}
ROCKETCHIP_NIX_REMOTE_HOST: ${{secrets.ROCKETCHIP_NIX_REMOTE_HOST}}
- uses: cachix/install-nix-action@v19
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
post-build-hook = /etc/nix/upload-to-cache.sh
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= minio.inner.fi.c-3.moe:gDg5SOIH65O0tTV89dUawME5BTmduWWaA7as/cqvevM=
extra-substituters = https://${{secrets.CACHE_DOMAIN}}/nix
sandbox = relaxed
max-jobs = 0
builders = ssh://nix-remote@${{secrets.ROCKETCHIP_NIX_REMOTE_HOST}}?ssh-key=/etc/nix/builder-key
builders-use-substitutes = true
- id: ci-tests
run: nix develop .#testcase -c make ci-unpassed-tests DEFAULT_PASSED=.github/passed/default.txt
ci:
name: "CI"
if: github.event.pull_request.merged == true
needs: [gen-matrix]
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.gen-matrix.outputs.ci-tests) }}
runs-on: [self-hosted, linux]
outputs:
result: ${{ steps.ci-run.outputs.result }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- run: sudo -E .github/setup-actions.sh
env:
AWS_CREDENTIALS: ${{secrets.AWS_CREDENTIALS}}
CACHE_PRIV_KEY: ${{secrets.CACHE_PRIV_KEY}}
CACHE_DOMAIN: ${{secrets.CACHE_DOMAIN}}
ROCKETCHIP_NIX_REMOTE_SSH_PRIVKEY: ${{secrets.ROCKETCHIP_NIX_REMOTE_SSH_PRIVKEY}}
ROCKETCHIP_NIX_REMOTE_HOST: ${{secrets.ROCKETCHIP_NIX_REMOTE_HOST}}
- uses: cachix/install-nix-action@v19
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
post-build-hook = /etc/nix/upload-to-cache.sh
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= minio.inner.fi.c-3.moe:gDg5SOIH65O0tTV89dUawME5BTmduWWaA7as/cqvevM=
extra-substituters = https://${{secrets.CACHE_DOMAIN}}/nix
sandbox = relaxed
max-jobs = 0
builders = ssh://nix-remote@${{secrets.ROCKETCHIP_NIX_REMOTE_HOST}}?ssh-key=/etc/nix/builder-key
builders-use-substitutes = true
- id: ci-run
run: |
nix develop .#testcase -c make ci-run "NAME=${{ matrix.name }}"
nix develop .#testcase -c make convert-perf-to-md
- uses: actions/upload-artifact@v3
if: always()
with:
name: results
path: |
./test-log/result-*
./test-log/**/fail-test-*.md
perf-result-*.md
- uses: actions/upload-artifact@v3
if: always()
with:
name: nix-post-build-hook-log
path: /tmp/nix-post-build-hook.log
report:
name: "Report CI result"
if: github.event.pull_request.merged == true && always()
needs: [ci]
runs-on: [self-hosted, linux]
steps:
- uses: actions/download-artifact@v3
with:
name: results
- run: printf "\n\n## Perf Result\n" >> $GITHUB_STEP_SUMMARY; cat perf-*.md >> $GITHUB_STEP_SUMMARY
- run: |
echo -e "\n## Newly passed tests\n" >> $GITHUB_STEP_SUMMARY
find . -name 'result.md' -exec bash -c 'cat {} >> $GITHUB_STEP_SUMMARY' \;
- run: |
echo -e "\n## Still failing tests\n" >> $GITHUB_STEP_SUMMARY
find . -name 'fail-test-*.md' -exec bash -c 'cat {} >> $GITHUB_STEP_SUMMARY' \;
release:
runs-on: [self-hosted, linux]
needs: report
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: master
- run: sudo -E .github/setup-actions.sh
env:
AWS_CREDENTIALS: ${{secrets.AWS_CREDENTIALS}}
CACHE_PRIV_KEY: ${{secrets.CACHE_PRIV_KEY}}
CACHE_DOMAIN: ${{secrets.CACHE_DOMAIN}}
ROCKETCHIP_NIX_REMOTE_SSH_PRIVKEY: ${{secrets.ROCKETCHIP_NIX_REMOTE_SSH_PRIVKEY}}
ROCKETCHIP_NIX_REMOTE_HOST: ${{secrets.ROCKETCHIP_NIX_REMOTE_HOST}}
- uses: cachix/install-nix-action@v19
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
post-build-hook = /etc/nix/upload-to-cache.sh
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= minio.inner.fi.c-3.moe:gDg5SOIH65O0tTV89dUawME5BTmduWWaA7as/cqvevM=
extra-substituters = https://${{secrets.CACHE_DOMAIN}}/nix
sandbox = relaxed
max-jobs = 0
builders = ssh://nix-remote@${{secrets.ROCKETCHIP_NIX_REMOTE_HOST}}?ssh-key=/etc/nix/builder-key
builders-use-substitutes = true
- id: build
run: |
. .github/scripts/ci.sh
check_before_do_release ./rvv-testcase.tar.gz
- uses: "marvinpinto/action-automatic-releases@latest"
id: step-release
if: ${{ steps.build.outputs.do_release == 'true' }}
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
automatic_release_tag: "${{ steps.build.outputs.tag }}"
title: "Testcase Release ${{ steps.build.outputs.tag }}"
files: ./rvv-testcase.tar.gz
- if: ${{ steps.build.outputs.do_release == 'true' }}
run: |
. .github/scripts/ci.sh
bump "${{ steps.build.outputs.tag }}"
- if: ${{ steps.build.outputs.do_release == 'true' }}
uses: peter-evans/create-pull-request@v5
with:
add-paths: ./nix/rvv-testcase-unwrapped.nix
commit-message: "[nix] bump testcase to version ${{ steps.build.outputs.tag }}"
branch: nix-testcase-bump
delete-branch: true
title: "[nix] bump testcase to version ${{ steps.build.outputs.tag }}"
body: "Bump rvv-testcase-unwrapped.nix"
reviewers: |
avimitin
sequencer