Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AUTO : Forward from alpha to beta #26

Merged
merged 60 commits into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
26d3442
Add missed directives to library files, rename lib file of module `wmath
dmvict Jun 15, 2022
d55f44c
Extend willfile, add field with js module directory
dmvict Jun 15, 2022
b5bdb1d
Update config files of js module
dmvict Jun 15, 2022
221d99d
Merge pull request #19 from dmvict/update
Wandalen Jun 15, 2022
715099b
version 0.3.177
Wandalen Jun 18, 2022
8c71b4e
version 0.3.178
Wandalen Jun 18, 2022
2147672
version 0.3.179
Wandalen Jun 18, 2022
cf4f9d2
version 0.3.180
Wandalen Jun 18, 2022
96ca7c9
Fix workflows, use valid links to common workflows
dmvict Jul 4, 2022
a3d0ff9
Merge pull request #20 from dmvict/workflow
Wandalen Jul 7, 2022
0941417
Update workflows, sync its with main repository
dmvict Jul 7, 2022
b85d2f2
Merge pull request #21 from dmvict/workflow
Wandalen Jul 7, 2022
173a5d7
sync CI/CD
Wandalen Jul 12, 2022
8093aeb
Merge branch 'alpha' of git+ssh://github.com/Wandalen/wMath into alpha
Wandalen Jul 12, 2022
7c1f491
include mod_interface
Wandalen Jul 12, 2022
dc445a2
publish
Wandalen Jul 12, 2022
849768d
Fix module `math_adapter` and its samples, compile and run tests unde…
dmvict Jul 12, 2022
c0b8d92
Improve sample `math_adapter_operators_sample`, add features
dmvict Jul 12, 2022
65ec872
Update module `math_adapter`, use macro `mod_interface` to generate n…
dmvict Jul 12, 2022
de6ed6d
Update module `wmath`, use macro `mod_interface` to generate namespaces
dmvict Jul 12, 2022
e38eafb
Merge pull request #22 from dmvict/mod_interface
Wandalen Jul 13, 2022
bf5b21d
publish
Wandalen Jul 13, 2022
37f1ed6
publish
Wandalen Jul 13, 2022
97df520
publish
Wandalen Jul 13, 2022
2f12542
publish
Wandalen Jul 14, 2022
4fe2db8
publish
Wandalen Jul 14, 2022
fe00a00
Update entry files of module `math_adapter`, use new version of macro…
dmvict Jul 14, 2022
c569bff
Merge pull request #23 from dmvict/update
Wandalen Jul 16, 2022
9c453eb
experimenting
Wandalen Jul 16, 2022
36714c8
Merge branch 'alpha' of git+ssh://github.com/Wandalen/wMath into alpha
Wandalen Jul 16, 2022
81e9e94
refactor using mod_interface
Wandalen Jul 16, 2022
6c63d47
refactor using mod_interface
Wandalen Jul 16, 2022
4492749
refactor using mod_interface
Wandalen Jul 16, 2022
0a10315
refactor using mod_interface
Wandalen Jul 16, 2022
4924154
refactor using mod_interface
Wandalen Jul 17, 2022
9afb5ff
refactor using mod_interface
Wandalen Jul 17, 2022
9279aa6
refactor using mod_interface
Wandalen Jul 18, 2022
c860715
refactoring
Wandalen Jul 18, 2022
6493cf5
Update workflows of module, sync workflows with main repository
dmvict Jul 18, 2022
9ff5403
Merge pull request #24 from dmvict/workflow
Wandalen Jul 18, 2022
fc76c38
refactoring
Wandalen Jul 18, 2022
c93b27b
Merge branch 'alpha' of git+ssh://github.com/Wandalen/wMath into alpha
Wandalen Jul 18, 2022
5d8b345
!test
Wandalen Jul 18, 2022
40746f3
Update file `Readme.md`, add common badge, fix links
dmvict Jul 18, 2022
739f173
Update module `wmath`, inline doc of reexports
dmvict Jul 18, 2022
67f97d5
Fix sample `wmath_trivial_sample`, import structure from namespace
dmvict Jul 18, 2022
0dc1fe9
fixing
Wandalen Jul 18, 2022
b33f242
!test
Wandalen Jul 18, 2022
3ef72bd
Merge branch `alpha` of https://github.com/Wandalen/wMath into readme
dmvict Jul 18, 2022
a799448
Merge pull request #25 from dmvict/readme
Wandalen Jul 18, 2022
e2f260b
rearrange tests
Wandalen Jul 18, 2022
21456e4
Merge branch 'alpha' of git+ssh://github.com/Wandalen/wMath into alpha
Wandalen Jul 18, 2022
c9dd96a
!test
Wandalen Jul 18, 2022
4c010b9
refactoring !test
Wandalen Jul 18, 2022
9bb00a9
refactoring !test
Wandalen Jul 18, 2022
b0f774a
Fix module `math_adapter`, compile submodule under feature, remove ex…
dmvict Jul 19, 2022
0fe2ba0
Fix test of module `math_adapter`, run tests under feature
dmvict Jul 19, 2022
432b9b9
Merge pull request #28 from dmvict/fix
Wandalen Jul 19, 2022
dceb81e
Update workflow `AutoPrToBeta`, resolve all inputs for merge action
dmvict Jul 19, 2022
2f360df
Merge pull request #30 from dmvict/workflow
dmvict Jul 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/AppropriateBranchBeta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on :
jobs :

appropriate_branch :
uses : Wandalen/wTools/.github/workflows/AppropriateBranch.yml@master
uses : Wandalen/wTools/.github/workflows/AppropriateBranch.yml@alpha
with :
src_branch : 'alpha'
dst_branch : '${{ github.base_ref }}'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/AppropriateBranchMaster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on :
jobs :

appropriate_branch :
uses : Wandalen/wTools/.github/workflows/AppropriateBranch.yml@master
uses : Wandalen/wTools/.github/workflows/AppropriateBranch.yml@alpha
with :
src_branch : 'beta'
dst_branch : '${{ github.base_ref }}'
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/AutoMergeToBeta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@

name : auto_merge_to_beta

on :
push :
branches : [ alpha ]

concurrency :

group : auto_merge_to_beta
cancel-in-progress : true

jobs :

get_modules:
outputs :
workflow_files: ${{ steps.workflow_files.outputs.files }}
workflow_names: ${{ steps.workflow_names.outputs.names }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: workflow_files
run: |
WORKFLOWS=$(ls .github/workflows | grep Module)
for WORKFLOW in $WORKFLOWS ; do
NAME=$(echo $WORKFLOW | sed 's/\(\S\+\).yml/\1/')
NAMES="$NAMES $NAME"
done;
NAMES=$(sed 's/\s\+/\n/g' <<< $NAMES)
OUTPUT=$(echo "$NAMES" | jq -R -s -c 'split("\n")[1:-1]')
echo "::set-output name=files::{\"modules\":$OUTPUT}"
- id: workflow_names
run: |
WORKFLOWS=$(ls .github/workflows | grep Module)
for WORKFLOW in $WORKFLOWS ; do
NAME=$(cat .github/workflows/$WORKFLOW | grep -G '^name :' | sed 's/name\s*:\s\+\(\S*\)/\1/')
NAMES="$NAMES%0A$NAME"
done;
echo "::set-output name=names::$NAMES"

wait_for_modules :
needs : get_modules
runs-on : ubuntu-latest
steps :
- name : Waiting ...
uses : willgarcia/workflow-wait-action@main
with :
timeout : 21600
interval : 60
initial_delay : 60
workflows : ${{ needs.get_modules.outputs.workflow_names }}

runs_check :
needs :
- get_modules
- wait_for_modules
strategy :
matrix : ${{ fromJSON( needs.get_modules.outputs.workflow_files ) }}
runs-on : ubuntu-latest
steps :
- name : Check workflow run status
id : check_ci
uses : LASER-Yi/workflow-status@v0.1.0
with :
token : ${{ secrets.GITHUB_TOKEN }}
workflow : ${{ matrix.modules }}.yml
event : push
branch : alpha
- name : Check failure conclusion
if : ${{ steps.check_ci.outputs.conclusion == 'failure' }}
run : exit 1
- name : Check cancelled conclusion
if : ${{ steps.check_ci.outputs.conclusion == 'cancelled' }}
run : exit 1
- name : Check skipped conclusion
if : ${{ steps.check_ci.outputs.conclusion == 'skipped' }}
run : exit 1

merge :
needs : runs_check
runs-on : ubuntu-latest
steps :
- name : Find PR number for current commit
uses : jwalton/gh-find-current-pr@v1
id : find
with :
state: open
- name: Automerge passed pull request
if : ${{ success() }}
uses: juliangruber/merge-pull-request-action@v1
with:
github-token: ${{ secrets.PRIVATE_GITHUB_BOT_TOKEN }}
repo: ${{ github.repository }}
number: ${{ steps.find.outputs.number }}
method: merge
2 changes: 1 addition & 1 deletion .github/workflows/AutoPrToAlpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on :
jobs :

forward :
uses : Wandalen/wTools/.github/workflows/AutoPr.yml@master
uses : Wandalen/wTools/.github/workflows/AutoPr.yml@alpha
with :
src_branch : '${{ github.ref_name }}'
dst_branch : 'alpha'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/AutoPrToBeta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on :
jobs :

forward :
uses : Wandalen/wTools/.github/workflows/AutoPr.yml@master
uses : Wandalen/wTools/.github/workflows/AutoPr.yml@alpha
with :
src_branch : 'alpha'
dst_branch : 'beta'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/AutoPrToMaster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on :
jobs :

forward :
uses : Wandalen/wTools/.github/workflows/AutoPr.yml@master
uses : Wandalen/wTools/.github/workflows/AutoPr.yml@alpha
with :
src_branch : 'beta'
dst_branch : 'master'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ModuleMathAdapterPush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env :
jobs :

test :
uses : Wandalen/wTools/.github/workflows/StandardRustPush.yml@master
uses : Wandalen/wTools/.github/workflows/StandardRustPush.yml@alpha
with :
manifest_path : 'module/rust/math_adapter/Cargo.toml'
module_name : 'math_adapter'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ModulewMathPush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env :
jobs :

test :
uses : Wandalen/wTools/.github/workflows/StandardRustPush.yml@master
uses : Wandalen/wTools/.github/workflows/StandardRustPush.yml@alpha
with :
manifest_path : 'module/rust/wmath/Cargo.toml'
module_name : 'wmath'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/NpmJsPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs :
runs-on : ubuntu-latest
steps :
- name : Validate tag
if : !contains( github.event.head_commit.message, '!tag:' )
if : ${{ !contains( github.event.head_commit.message, '!tag:' ) }}
run : |
echo "Invalid commit message. Add directive `!tag` with tag name in format `!tag:[tag_name]`"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/StandardJsPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on : [ push ]
jobs :
test :
if : "startsWith( github.event.head_commit.message, 'version' ) && startsWith( github.ref, 'refs/tags/v' )"
uses : Wandalen/wTools/.github/workflows/StandardJsCommon.yml@master
uses : Wandalen/wToolsJs/.github/workflows/StandardJsCommon.yml@master
with :
matrix : '{ "os" : [ "ubuntu-latest", "windows-latest", "macos-latest" ], "node-version" : [ "12.9.1", "14.x", "16.x", "18.x" ] }'
group : standard_publish_${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/StandardJsPullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on : [ pull_request ]

jobs :
test :
uses : Wandalen/wTools/.github/workflows/StandardJsCommon.yml@master
uses : Wandalen/wToolsJs/.github/workflows/StandardJsCommon.yml@master
with :
matrix : '{ "os" : [ "ubuntu-latest", "windows-latest", "macos-latest" ], "node-version" : [ "14.x" ] }'
group : standard_pull_request_${{ github.head_ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/StandardJsPush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs :
contains( github.event.head_commit.message, '!test' )
&& !contains( github.event.head_commit.message, '!only_rust' )
&& !startsWith( github.event.head_commit.message, 'Merge' )
uses : Wandalen/wTools/.github/workflows/StandardJsCommon.yml@master
uses : Wandalen/wToolsJs/.github/workflows/StandardJsCommon.yml@master
with :
matrix : '{ "os" : [ "ubuntu-latest", "windows-latest", "macos-latest" ], "node-version" : [ "14.x" ] }'
group : standard_push_${{ github.ref }}
8 changes: 4 additions & 4 deletions .github/workflows/StandardRustPullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env :
CARGO_TERM_COLOR : always

concurrency :
group : standard_rust_pull_request_${{ github.base_ref }}
group : standard_rust_pull_request_${{ github.event.base.ref }}_${{ github.event.number }}
cancel-in-progress : true

jobs :
Expand Down Expand Up @@ -43,8 +43,8 @@ jobs :
tested :
needs: check
if : ${{ needs.check.outputs.should_run == 'true' }}
uses : Wandalen/wTools/.github/workflows/StandardRustPush.yml@master
uses : Wandalen/wTools/.github/workflows/StandardRustPush.yml@alpha
with :
manifest_path : './Cargo.toml'
module_name : ${{ needs.check.outputs.commit_message }}
commit_message : ${{ needs.check.outputs.commit_message }}
module_name : ${{ github.event.base.ref }}_${{ github.event.number }}
commit_message : ${{ github.event.base.ref }}_${{ github.event.number }}
77 changes: 77 additions & 0 deletions .github/workflows/StatusChecksRulesUpdate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

name : status_checks_rules_update

on :
pull_request :
types : [ opened ]
branches : [ alpha, beta ]

concurrency :

group : projected_rules_update
cancel-in-progress : true

jobs :

check_workflows :
if : ${{ github.event.pull_request.base.ref == 'beta' }}
outputs :
should_update : ${{ steps.compare.outputs.not_equal }}
runs-on : ubuntu-latest
steps :
- name : Compare workflow directories content
id : compare
run : |
files_beta=$(curl -X GET -G \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.PRIVATE_GITHUB_BOT_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/contents/.github/workflows \
-d 'ref=beta')
files_alpha=$(curl -X GET -G \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.PRIVATE_GITHUB_BOT_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/contents/.github/workflows \
-d 'ref=alpha')

if [[ "$files_beta" == "$files_alpha" ]] ; then
echo "::set-output name=not_equal::false"
else
echo "::set-output name=not_equal::true"
fi

update_beta :
needs : check_workflows
if : ${{ needs.check_workflows.outputs.should_update == 'true' }}
runs-on : ubuntu-latest
steps :
- uses: actions/checkout@v2
- name : Get options
id : options_get
run : |
WORKFLOWS=$(ls .github/workflows | grep Module)
for WORKFLOW in $WORKFLOWS ; do
CONTEXT=$(echo $WORKFLOW | sed 's/\(\S\+\).yml/{"context":"check (\1)","app_id":null}/')
CONTEXTS="$CONTEXTS,$CONTEXT"
done;
CHECKS="[$(sed 's/^,//g' <<< $CONTEXTS),{\"context\":\"runs_check\",\"app_id\":null}]"
echo "::set-output name=options::{\"required_status_checks\":{\"strict\":false,\"checks\":$CHECKS},\"enforce_admins\":false,\"required_pull_request_reviews\":null,\"restrictions\":null}"
- name : Setup rules for beta
run : |
curl -X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.PRIVATE_GITHUB_BOT_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/branches/beta/protection \
-d '${{ steps.options_get.outputs.options }}'

update_alpha :
if : ${{ github.event.pull_request.base.ref == 'alpha' }}
runs-on : ubuntu-latest
steps :
- name : Setup rules for alpha
run : |
CHECKS='[{"context":"tested / fast (ubuntu-latest)","app_id":null},{"context":"tested / fast (windows-latest)","app_id":null},{"context":"tested / fast (macos-latest)","app_id":null}]'
curl -X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.PRIVATE_GITHUB_BOT_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/branches/alpha/protection \
-d "{\"required_status_checks\":{\"strict\":false,\"checks\":$CHECKS},\"enforce_admins\":false,\"required_pull_request_reviews\":null,\"restrictions\":null}"
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<!-- {{# generate.main_header{} #}} -->

[![alpha](https://img.shields.io/github/workflow/status/Wandalen/wMath/auto_merge_to_beta/alpha?label=alpha&logo=github)](https://github.com/Wandalen/wMath/actions/workflows/AutoMergeToBeta.yml)
[![discord](https://img.shields.io/discord/872391416519737405?color=eee&logo=discord&logoColor=eee&label=ask)](https://discord.gg/m3YfbXpUUY)
[![Open in Gitpod](https://raster.shields.io/static/v1?label=try&message=online&color=eee&logo=gitpod&logoColor=eee)](https://gitpod.io/#RUN_PATH=.,SAMPLE_FILE=sample%2Frust%2Fwmath_trivial_sample%2Fsrc%2Fmain.rs,RUN_POSTFIX=--example%20wmath_trivial_sample/https://github.com/Wandalen/wMath)
[![docs.rs](https://raster.shields.io/static/v1?label=docs&message=online&color=eee&logo=docsdotrs&logoColor=eee)](https://docs.rs/wmath)
Expand Down
14 changes: 7 additions & 7 deletions module/js/wMath/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wmath",
"version": "0.3.160",
"version": "0.3.180",
"description": "Aggregates other math modules in single module.",
"author": "Kostiantyn Wandalen <wandalen@obox.systems>",
"license": "MIT",
Expand All @@ -23,14 +23,14 @@
"url": "https ://github.com/Wandalen/wMath/issues"
},
"dependencies": {
"wTools": "alpha",
"wmathvector": "alpha",
"wmathscalar": "alpha",
"wmathmodels": "alpha",
"wmathmatrix": "alpha"
"wTools": "latest",
"wmathvector": "latest",
"wmathscalar": "latest",
"wmathmodels": "latest",
"wmathmatrix": "latest"
},
"devDependencies": {
"wTesting": "alpha",
"wTesting": "latest",
"eslint": "7.32.0"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion module/js/wMath/was.package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wmath",
"version": "0.3.160",
"version": "0.3.180",
"description": "Aggregates other math modules in single module.",
"author": "Kostiantyn Wandalen <wandalen@obox.systems>",
"license": "MIT",
Expand Down
6 changes: 5 additions & 1 deletion module/rust/_skatch/rust/impl/math/wskatch_lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#![ cfg_attr( not( feature = "use_std" ), no_std ) ]
#![ doc( html_logo_url = "https://raw.githubusercontent.com/Wandalen/wTools/master/asset/img/logo_v3_trans_square.png" ) ]
#![ doc( html_favicon_url = "https://raw.githubusercontent.com/Wandalen/wTools/alpha/asset/img/logo_v3_trans_square_icon_small_v2.ico" ) ]
#![ doc( html_root_url = "https://docs.rs/data_type/latest/wskatch/" ) ]
#![ warn( rust_2018_idioms ) ]
#![ warn( missing_debug_implementations ) ]
#![ warn( missing_docs ) ]
Expand All @@ -11,7 +15,7 @@
//! .Skatch library with adapters.
//!

#![ doc = include_str!( concat!( env!( "CARGO_MANIFEST_DIR" ), "/Readme.md" ) ) ]
#![ doc = include_str!( concat!( env!( "CARGO_MANIFEST_DIR" ), "/", "Readme.md" ) ) ]

/// Basics.
pub mod basic;
Expand Down
11 changes: 7 additions & 4 deletions module/rust/math_adapter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "math_adapter"
version = "0.3.3"
version = "0.3.7"
edition = "2021"
authors = [
"Kostiantyn Wandalen <wandalen@obox.systems>",
Expand All @@ -17,6 +17,7 @@ Collection of math adapters to decouple your application from math libraries' im
"""
categories = [ "algorithms", "development-tools" ]
keywords = [ "fundamental", "general-purpose", "testing" ]
build = "rust/impl/math/math_adapter_build.rs"

[package.metadata.docs.rs]
all-features = true
Expand All @@ -43,7 +44,7 @@ name = "math_adapter"
path = "rust/impl/math/math_adapter_lib.rs"

[[test]]
name = "math_adapter_test"
name = "math_adapter_tests"
path = "rust/test/math/math_adapter_tests.rs"

[[example]]
Expand All @@ -66,8 +67,10 @@ cgmath = { version = "~0", optional = true }
nalgebra = { version = "~0", optional = true }
winit = { version = "~0", optional = true }
num-traits = "~0.2"
for_each = "~0.1"
meta_tools = "~0.2"
mem_tools = "~0.1"
# math_common = { path = "../../rust/math_common" }

[dev-dependencies]
tools = { path = "../../rust/tools" }
# tools = { path = "../../rust/tools" }
test_tools = { version = "~0.1" }
Loading