Skip to content

Commit

Permalink
Reduce text, one important TODO
Browse files Browse the repository at this point in the history
Signed-off-by: kuvaldini <[email protected]>
  • Loading branch information
kuvaldini committed Feb 8, 2022
1 parent 22c7f27 commit 98aa6a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 54 deletions.
33 changes: 3 additions & 30 deletions .github/_README.make-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ So I suggest yet another one `make-workflows.sh` based on YAML tool [`yq`](https
0. [Install](#ways-to-install) `make-workflows.sh` to reachable place inside or outside of your repo, i.e. '.github/'
1. Put your workflows to `.github/*.src.yml`
2. (recommended) `pre-commit install` and edit [`.pre-commit-config.yaml`](/.pre-commit-config.yaml) according to where [`make-workflows.sh`](./make-workflows.sh) is placed.
<sub>(altenative optional) Copy or link `pre-commit-hook.sh` to `.git/hooks/pre-commit`
<sub>(altenative optional) Copy or link `pre-commit-hook.sh` to `.git/hooks/pre-commit`
Like `ln -s ../../.github/pre-commit-hook.sh .git/hooks/pre-commit`</sub>

```
Expand Down Expand Up @@ -39,7 +39,7 @@ Options:
### Automate using pre-commit (recommended)
There is a nice tool [pre-commit](https://pre-commit.com) to do checks and some actions just before commit. The tool is called by Git pre-commit hook.

Making workflows is better being automated – just
Making workflows is better being automated – just
```sh
$ pre-commit install
```
Expand All @@ -60,36 +60,9 @@ repos:
> NOTE2: pay attention to path(s) where source files are stored `files: 'PATH_REGEXP'`


## Ways to install
1. raw by hand
```
curl 'https://raw.githubusercontent.com/kuvaldini/make-workflows.sh/main/make-workflows.sh' -LsSf >make-workflows.sh && chmod +x make-workflows.sh
```
2. using own facility, installs to /usr/local/bin
```
curl 'https://raw.githubusercontent.com/kuvaldini/make-workflows.sh/main/make-workflows.sh' -LsSf | bash -s -- --install
```
> NOTE: may require `...| sudo bash...`
3. node package manager
```
npm install kuvaldini/make-workflows.sh
```
or `npm install git+https://github.com/kuvaldini/make-workflows.sh`
4. TODO webinstall
### Links
1. https://stackoverflow.com/questions/67368724/share-same-steps-for-different-github-actions-jobs
2. https://github.community/t/support-for-yaml-anchors/16128/60
3. https://github.com/mithro/actions-includes
4. https://github.com/allejo/gha-workflows
5. this repo https://github.com/kuvaldini/make-workflows.sh
## License, Authors
Authored by [@Kuvaldini](https://github.com/kuvaldini), 2021.
Please keep links to the source code [this repo](https://github.com/kuvaldini/make-workflows.sh)
Creation of this repo was inspired by [@karfau](https://github.com/karfau)
5. dedicated repo https://github.com/kuvaldini/make-workflows.sh
5 changes: 1 addition & 4 deletions .github/build-iroha1.src.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Iroha1

## TODO IMPORTANT DISALLOW deploying tags and main and develop builds where skip_testing was set.
## TODO 1. [vcpkg,optimization-space,optimization-speed]
## Build only Debug or only Release - reduce vcpkg build duration and output size 2times
## see directory triplets/, `vcpkg help triplets` and link: https://stackoverflow.com/a/52781832/3743145
Expand Down Expand Up @@ -472,10 +473,6 @@ jobs:
esac
echo >>$GITHUB_ENV features="$features"
echo >>$GITHUB_ENV skip_testing=$(echo ${{matrix.buildspec}} | grep -Fo skip_testing)
# if [[ " ${{matrix.buildspec}} " = *" skip_testing "* ]] #echo ${{matrix.buildspec}} | grep -Fq skip_testing
# then echo >>$GITHUB_ENV CMAKE_TESTING=-DTESTING=OFF CMAKE_BENCHMARKING=OFF
# else echo >>$GITHUB_ENV CMAKE_TESTING=-DTESTING=ON CMAKE_BENCHMARKING=ON
# fi
- *step_detect_commented_pr
- &step_checkout_full
<<: *step_checkout
Expand Down
21 changes: 1 addition & 20 deletions .github/workflows/build-iroha1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
## Generated from build-iroha1.src.yml with make-workflows.sh

name: Iroha1
## TODO IMPORTANT DISALLOW deploying tags and main and develop builds where skip_testing was set.
## TODO 1. [vcpkg,optimization-space,optimization-speed]
## Build only Debug or only Release - reduce vcpkg build duration and output size 2times
## see directory triplets/, `vcpkg help triplets` and link: https://stackoverflow.com/a/52781832/3743145
Expand Down Expand Up @@ -522,10 +523,6 @@ jobs:
esac
echo >>$GITHUB_ENV features="$features"
echo >>$GITHUB_ENV skip_testing=$(echo ${{matrix.buildspec}} | grep -Fo skip_testing)
# if [[ " ${{matrix.buildspec}} " = *" skip_testing "* ]] #echo ${{matrix.buildspec}} | grep -Fq skip_testing
# then echo >>$GITHUB_ENV CMAKE_TESTING=-DTESTING=OFF CMAKE_BENCHMARKING=OFF
# else echo >>$GITHUB_ENV CMAKE_TESTING=-DTESTING=ON CMAKE_BENCHMARKING=ON
# fi
- name: REF and SHA of commented PR to ENV
if: github.event.comment
run: >
Expand Down Expand Up @@ -808,10 +805,6 @@ jobs:
esac
echo >>$GITHUB_ENV features="$features"
echo >>$GITHUB_ENV skip_testing=$(echo ${{matrix.buildspec}} | grep -Fo skip_testing)
# if [[ " ${{matrix.buildspec}} " = *" skip_testing "* ]] #echo ${{matrix.buildspec}} | grep -Fq skip_testing
# then echo >>$GITHUB_ENV CMAKE_TESTING=-DTESTING=OFF CMAKE_BENCHMARKING=OFF
# else echo >>$GITHUB_ENV CMAKE_TESTING=-DTESTING=ON CMAKE_BENCHMARKING=ON
# fi
- name: REF and SHA of commented PR to ENV
if: github.event.comment
run: >
Expand Down Expand Up @@ -1107,10 +1100,6 @@ jobs:
esac
echo >>$GITHUB_ENV features="$features"
echo >>$GITHUB_ENV skip_testing=$(echo ${{matrix.buildspec}} | grep -Fo skip_testing)
# if [[ " ${{matrix.buildspec}} " = *" skip_testing "* ]] #echo ${{matrix.buildspec}} | grep -Fq skip_testing
# then echo >>$GITHUB_ENV CMAKE_TESTING=-DTESTING=OFF CMAKE_BENCHMARKING=OFF
# else echo >>$GITHUB_ENV CMAKE_TESTING=-DTESTING=ON CMAKE_BENCHMARKING=ON
# fi
- name: Homebrew
run: brew install cmake ninja coreutils ccache bash
## Takes 22 seconds with default github runner
Expand Down Expand Up @@ -1503,10 +1492,6 @@ jobs:
esac
echo >>$GITHUB_ENV features="$features"
echo >>$GITHUB_ENV skip_testing=$(echo ${{matrix.buildspec}} | grep -Fo skip_testing)
# if [[ " ${{matrix.buildspec}} " = *" skip_testing "* ]] #echo ${{matrix.buildspec}} | grep -Fq skip_testing
# then echo >>$GITHUB_ENV CMAKE_TESTING=-DTESTING=OFF CMAKE_BENCHMARKING=OFF
# else echo >>$GITHUB_ENV CMAKE_TESTING=-DTESTING=ON CMAKE_BENCHMARKING=ON
# fi
- name: REF and SHA of commented PR to ENV
if: github.event.comment
run: >
Expand Down Expand Up @@ -1683,10 +1668,6 @@ jobs:
esac
echo >>$GITHUB_ENV features="$features"
echo >>$GITHUB_ENV skip_testing=$(echo ${{matrix.buildspec}} | grep -Fo skip_testing)
# if [[ " ${{matrix.buildspec}} " = *" skip_testing "* ]] #echo ${{matrix.buildspec}} | grep -Fq skip_testing
# then echo >>$GITHUB_ENV CMAKE_TESTING=-DTESTING=OFF CMAKE_BENCHMARKING=OFF
# else echo >>$GITHUB_ENV CMAKE_TESTING=-DTESTING=ON CMAKE_BENCHMARKING=ON
# fi
- name: REF and SHA of commented PR to ENV
if: github.event.comment
run: >
Expand Down

0 comments on commit 98aa6a3

Please sign in to comment.