From d821eee2b206fadff514314c1bbddc39ff2f17e9 Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 11:09:12 +0200 Subject: [PATCH 01/22] test: matrix building dynamically --- .ci/build_matrix.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .ci/build_matrix.sh diff --git a/.ci/build_matrix.sh b/.ci/build_matrix.sh new file mode 100644 index 0000000000..65210fdbe3 --- /dev/null +++ b/.ci/build_matrix.sh @@ -0,0 +1,49 @@ +# List of versions +versions=( + 'v22.2.1' + 'v22.2-ubuntu' + 'v23.1.0' + 'v23.1-ubuntu' + 'v23.2.0' + 'v23.2-ubuntu' + 'v24.1.0' + 'v24.1-ubuntu' + 'v24.1-ubuntu-student' + 'v24.2.0' + 'latest-ubuntu' + 'latest-ubuntu-student' +) + +JSON="{\"include\":[" + +# Loop through each version +for version in "${versions[@]}"; do + echo "Processing version: $version" + # echo "::add-matrix name=app::%changed_path%" + # Place your command here + # For example, you can pull Docker images + # docker pull myimage:$version + + + + # Add build to the matrix only if it is not already included + JSONline="{\"mapdl-version\": \"$version\", \"extended_testing\": \"false\"}," + if [[ "$JSON" != *"$JSONline"* ]]; then + JSON="$JSON$JSONline" + fi + + + # Set output + echo "matrix=$( echo "$JSON" )" >> $GITHUB_OUTPUT + +done + +# Remove last "," and add closing brackets +if [[ $JSON == *, ]]; then + JSON="${JSON%?}" +fi +JSON="$JSON]}" +echo $JSON + +# Set output +echo "matrix=$( echo "$JSON" )" >> $GITHUB_OUTPUT \ No newline at end of file From 3d858594d39a963b14c4474f41ce1dfc7a364699 Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 11:10:47 +0200 Subject: [PATCH 02/22] test: calling building matrix --- .github/workflows/ci.yml | 58 ++++++++++------------------------------ 1 file changed, 14 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 555da1bac8..610256c6c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -324,57 +324,27 @@ jobs: run: | .ci/display_logs.sh + build-test-matrix: + name: "Build matrix test" + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - id: set-matrix + run: .ci/build_matrix.sh + + + + build-test: name: "Remote: Build & test MAPDL ${{ matrix.mapdl-version }} (Extended testing ${{ matrix.extended_testing }})" runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' - needs: [smoke-tests] + needs: [smoke-tests, build-test-matrix] timeout-minutes: 35 strategy: fail-fast: false - matrix: - mapdl-version: [ - 'v22.2.1', - 'v22.2-ubuntu', - 'v23.1.0', - 'v23.1-ubuntu', - 'v23.2.0', - 'v23.2-ubuntu', - 'v24.1.0', - 'v24.1-ubuntu', - 'v24.1-ubuntu-student', - 'v24.2.0', - 'latest-ubuntu', - 'latest-ubuntu-student', - ] - extended_testing: - - ${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }} - exclude: - # In PRs skipping all MAPDL version except student ones (commented out). - - extended_testing: false - mapdl-version: 'v22.2.1' - - extended_testing: false - mapdl-version: 'v22.2-ubuntu' - - extended_testing: false - mapdl-version: 'v23.1.0' - - extended_testing: false - mapdl-version: 'v23.1-ubuntu' - - extended_testing: false - mapdl-version: 'v23.2.0' - - extended_testing: false - mapdl-version: 'v23.2-ubuntu' - - extended_testing: false - mapdl-version: 'v24.1.0' - - extended_testing: false - mapdl-version: 'v24.1-ubuntu' - # - extended_testing: false - # mapdl-version: 'v24.1-ubuntu-student' - - extended_testing: false - mapdl-version: 'v24.2.0' - - extended_testing: false - mapdl-version: 'latest-ubuntu' - # - extended_testing: false - # mapdl-version: 'latest-ubuntu-student' + matrix: ${{fromJson(needs.build-test-matrix.outputs.matrix)}} env: PYMAPDL_PORT: 21000 # default won't work on GitHub runners From 2bf8ac91dad3138d40100f8c5226d1cf69220b12 Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 11:14:50 +0200 Subject: [PATCH 03/22] test: fix file permissions --- .ci/build_matrix.sh | 0 .github/workflows/ci.yml | 3 --- 2 files changed, 3 deletions(-) mode change 100644 => 100755 .ci/build_matrix.sh diff --git a/.ci/build_matrix.sh b/.ci/build_matrix.sh old mode 100644 new mode 100755 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 610256c6c3..529b0d85f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -332,9 +332,6 @@ jobs: steps: - id: set-matrix run: .ci/build_matrix.sh - - - build-test: name: "Remote: Build & test MAPDL ${{ matrix.mapdl-version }} (Extended testing ${{ matrix.extended_testing }})" From 4f8e12a1a608ad463237c501133e109b3f7c1890 Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 11:16:29 +0200 Subject: [PATCH 04/22] feat: adding checkout --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 529b0d85f4..e5cd487a52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -330,6 +330,8 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: + - name: "Install Git and checkout project" + uses: actions/checkout@v4.1.7 - id: set-matrix run: .ci/build_matrix.sh From f005da71bb45bd37951305bdf9975f56d0b93bc6 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot Date: Fri, 28 Jun 2024 09:27:10 +0000 Subject: [PATCH 05/22] chore: adding changelog file 3232.changed.md --- doc/changelog.d/3232.changed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/3232.changed.md diff --git a/doc/changelog.d/3232.changed.md b/doc/changelog.d/3232.changed.md new file mode 100644 index 0000000000..54d1f17327 --- /dev/null +++ b/doc/changelog.d/3232.changed.md @@ -0,0 +1 @@ +ci: Using a dynamically generated matrix for testing job setup \ No newline at end of file From 0658a9accfec965e68abf53b7314464d155d5619 Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 11:36:47 +0200 Subject: [PATCH 06/22] test: checks if github context is accessible from shell script --- .ci/build_matrix.sh | 16 +++++++++------- .github/workflows/ci.yml | 11 ++++++++++- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.ci/build_matrix.sh b/.ci/build_matrix.sh index 65210fdbe3..dc60f3be94 100755 --- a/.ci/build_matrix.sh +++ b/.ci/build_matrix.sh @@ -18,21 +18,23 @@ JSON="{\"include\":[" # Loop through each version for version in "${versions[@]}"; do - echo "Processing version: $version" - # echo "::add-matrix name=app::%changed_path%" - # Place your command here - # For example, you can pull Docker images - # docker pull myimage:$version + + extended_testing="${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }}" + auth_user=${{ steps.is_organization_member.outputs.result == 'false' }} + echo "Processing" + echo " - Version: $version" + echo " - extended_testing: $extended_testing" + echo " - auth_user: $auth_user" # Add build to the matrix only if it is not already included - JSONline="{\"mapdl-version\": \"$version\", \"extended_testing\": \"false\"}," + JSONline="{\"mapdl-version\": \"$version\", \"extended_testing\": \"$extended_testing\", \"auth_user\": \"$auth_user\"}," + if [[ "$JSON" != *"$JSONline"* ]]; then JSON="$JSON$JSONline" fi - # Set output echo "matrix=$( echo "$JSON" )" >> $GITHUB_OUTPUT diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5cd487a52..12936385ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -327,18 +327,27 @@ jobs: build-test-matrix: name: "Build matrix test" runs-on: ubuntu-latest + if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: "Install Git and checkout project" uses: actions/checkout@v4.1.7 + + - name: Check if author it is organization member + id: is_organization_member + uses: JamesSingleton/is-organization-member@1.0.0 + with: + organization: ansys + username: ${{ github.event.issue.user.login }} + token: ${{ secrets.GITHUB_TOKEN }} + - id: set-matrix run: .ci/build_matrix.sh build-test: name: "Remote: Build & test MAPDL ${{ matrix.mapdl-version }} (Extended testing ${{ matrix.extended_testing }})" runs-on: ubuntu-latest - if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' needs: [smoke-tests, build-test-matrix] timeout-minutes: 35 strategy: From c6192abfe999434dadac00410747b8c3b1fdf9e4 Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 11:39:28 +0200 Subject: [PATCH 07/22] fix: wrong github user login --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12936385ca..3540bb1878 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -339,7 +339,7 @@ jobs: uses: JamesSingleton/is-organization-member@1.0.0 with: organization: ansys - username: ${{ github.event.issue.user.login }} + username: ${{ github.event.pull_request.user.login }} token: ${{ secrets.GITHUB_TOKEN }} - id: set-matrix From 8d0177c7e8ecf67703dfa5f1b97defc5ed0431e6 Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 12:22:37 +0200 Subject: [PATCH 08/22] feat: checking in a script which test should be generated. --- .ci/build_matrix.sh | 76 ++++++++++++++++++++++++++++++---------- .github/workflows/ci.yml | 3 ++ 2 files changed, 60 insertions(+), 19 deletions(-) diff --git a/.ci/build_matrix.sh b/.ci/build_matrix.sh index dc60f3be94..cac1fd4644 100755 --- a/.ci/build_matrix.sh +++ b/.ci/build_matrix.sh @@ -1,42 +1,80 @@ # List of versions versions=( - 'v22.2.1' - 'v22.2-ubuntu' - 'v23.1.0' - 'v23.1-ubuntu' - 'v23.2.0' - 'v23.2-ubuntu' + 'latest-ubuntu' + 'latest-ubuntu-student' + 'v24.2.0' 'v24.1.0' 'v24.1-ubuntu' 'v24.1-ubuntu-student' - 'v24.2.0' - 'latest-ubuntu' - 'latest-ubuntu-student' + 'v23.2.0' + 'v23.2-ubuntu' + 'v23.1.0' + 'v23.1-ubuntu' + 'v22.2.1' + 'v22.2-ubuntu' ) JSON="{\"include\":[" +counter=0 # Loop through each version for version in "${versions[@]}"; do - extended_testing="${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }}" + # 1 based counter + ((counter++)) - auth_user=${{ steps.is_organization_member.outputs.result == 'false' }} + if [[ "${{ matrix.mapdl-version }}" == *"ubuntu"* ]]; then + export ON_UBUNTU=true; + else + export ON_UBUNTU=false; + fi + + if [[ "${{ matrix.mapdl-version }}" == *"student"* ]]; then + export ON_STUDENT=true; + else + export ON_STUDENT=false; + fi - echo "Processing" + echo "Processing $counter" echo " - Version: $version" echo " - extended_testing: $extended_testing" echo " - auth_user: $auth_user" + echo " - Student: $ON_STUDENT" + echo " - Ubuntu: $ON_UBUNTU" + echo "" - # Add build to the matrix only if it is not already included - JSONline="{\"mapdl-version\": \"$version\", \"extended_testing\": \"$extended_testing\", \"auth_user\": \"$auth_user\"}," + if [[ $auth_user == "true"]]; then + if [[ $extended_testing == "true" ]]; then + # runs everything + add_line="true" + else + # Runs only "latest" and last two versions. + # Last 6 registries in list above. + if [[ $counter -le 6 ]]; then + add_line="true" + else + add_line="false" + fi + fi + else + if [[ $ON_STUDENT == "true" ]]; then + add_line="true" + else + add_line="false" + fi; - if [[ "$JSON" != *"$JSONline"* ]]; then - JSON="$JSON$JSONline" - fi + if [["$add_line" == "true" ]]; then + JSONline="{\"mapdl-version\": \"$version\"}," + + echo "ADDED line: $JSONline" - # Set output - echo "matrix=$( echo "$JSON" )" >> $GITHUB_OUTPUT + # checks that the line is not repeated before adding it. + if [[ "$JSON" != *"$JSONline"* ]]; then + JSON="$JSON$JSONline" + fi + else + echo "NOT added line" + fi done diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3540bb1878..69db6373a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -343,6 +343,9 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - id: set-matrix + env: + extended_testing: ${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }} + auth_user: ${{ steps.is_organization_member.outputs.result == 'false' }} run: .ci/build_matrix.sh build-test: From c43e513e0d413a631f494f5056cdf494401558b6 Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 12:43:43 +0200 Subject: [PATCH 09/22] fix: final implementation --- .ci/build_matrix.sh | 43 +++++++++++++++++++++++----------------- .github/workflows/ci.yml | 2 +- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/.ci/build_matrix.sh b/.ci/build_matrix.sh index cac1fd4644..6373f1de3c 100755 --- a/.ci/build_matrix.sh +++ b/.ci/build_matrix.sh @@ -3,6 +3,8 @@ versions=( 'latest-ubuntu' 'latest-ubuntu-student' 'v24.2.0' + 'v24.2-ubuntu' + 'v24.2-ubuntu-student' 'v24.1.0' 'v24.1-ubuntu' 'v24.1-ubuntu-student' @@ -16,6 +18,10 @@ versions=( JSON="{\"include\":[" +MINIMAL_VERSIONS=2 +LATEST=2 # for 'latest-ubuntu' and 'latest-ubuntu-student' +CUTOUT=$(($LATEST+$MINIMAL_VERSIONS*3)) # do not process more than the $CUTOUT versions in above file + counter=0 # Loop through each version for version in "${versions[@]}"; do @@ -23,16 +29,16 @@ for version in "${versions[@]}"; do # 1 based counter ((counter++)) - if [[ "${{ matrix.mapdl-version }}" == *"ubuntu"* ]]; then - export ON_UBUNTU=true; + if [[ "$version" == *"ubuntu"* ]]; then + ON_UBUNTU=true; else - export ON_UBUNTU=false; + ON_UBUNTU=false; fi - if [[ "${{ matrix.mapdl-version }}" == *"student"* ]]; then - export ON_STUDENT=true; + if [[ "$version" == *"student"* ]]; then + ON_STUDENT=true; else - export ON_STUDENT=false; + ON_STUDENT=false; fi echo "Processing $counter" @@ -41,29 +47,29 @@ for version in "${versions[@]}"; do echo " - auth_user: $auth_user" echo " - Student: $ON_STUDENT" echo " - Ubuntu: $ON_UBUNTU" - echo "" - if [[ $auth_user == "true"]]; then - if [[ $extended_testing == "true" ]]; then + if [[ "$auth_user" == "true" ]]; then + if [[ "$extended_testing" == "true" ]]; then # runs everything - add_line="true" + add_line="true"; else # Runs only "latest" and last two versions. # Last 6 registries in list above. - if [[ $counter -le 6 ]]; then - add_line="true" + if [[ $counter -le $CUTOUT ]]; then + add_line="true"; else - add_line="false" + add_line="false"; fi fi else - if [[ $ON_STUDENT == "true" ]]; then - add_line="true" + if [[ $ON_STUDENT == "true" && $counter -le $CUTOUT ]]; then + add_line="true"; else - add_line="false" - fi; + add_line="false"; + fi + fi - if [["$add_line" == "true" ]]; then + if [[ "$add_line" == "true" ]]; then JSONline="{\"mapdl-version\": \"$version\"}," echo "ADDED line: $JSONline" @@ -75,6 +81,7 @@ for version in "${versions[@]}"; do else echo "NOT added line" fi + echo "" done diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69db6373a2..9b8723b890 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -345,7 +345,7 @@ jobs: - id: set-matrix env: extended_testing: ${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }} - auth_user: ${{ steps.is_organization_member.outputs.result == 'false' }} + auth_user: ${{ steps.is_organization_member.outputs.result == 'true' }} run: .ci/build_matrix.sh build-test: From 380402f82e40a5f0c805044d47904b1a609221ba Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 12:59:55 +0200 Subject: [PATCH 10/22] ci: replacing action --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b8723b890..19695b0472 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -333,19 +333,19 @@ jobs: steps: - name: "Install Git and checkout project" uses: actions/checkout@v4.1.7 - - - name: Check if author it is organization member + + - uses: tspascoal/get-user-teams-membership@v3 id: is_organization_member - uses: JamesSingleton/is-organization-member@1.0.0 with: + username: ${{ github.actor }} organization: ansys - username: ${{ github.event.pull_request.user.login }} - token: ${{ secrets.GITHUB_TOKEN }} + team: 'pymapdl-developers' + GITHUB_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} - id: set-matrix env: extended_testing: ${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }} - auth_user: ${{ steps.is_organization_member.outputs.result == 'true' }} + auth_user: ${{ steps.is_organization_member.outputs.isTeamMember == 'true' }} run: .ci/build_matrix.sh build-test: From e0d1b29db92966b7627f96a56ba24eed1b3131ec Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 17:22:03 +0200 Subject: [PATCH 11/22] feat: adding hardlimit --- .ci/build_matrix.sh | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.ci/build_matrix.sh b/.ci/build_matrix.sh index 6373f1de3c..4e8aca58dd 100755 --- a/.ci/build_matrix.sh +++ b/.ci/build_matrix.sh @@ -16,11 +16,23 @@ versions=( 'v22.2-ubuntu' ) -JSON="{\"include\":[" -MINIMAL_VERSIONS=2 + LATEST=2 # for 'latest-ubuntu' and 'latest-ubuntu-student' -CUTOUT=$(($LATEST+$MINIMAL_VERSIONS*3)) # do not process more than the $CUTOUT versions in above file + +# Do not process more than the $CUTOUT versions in above list +UTH_USER_LIMIT_VERSIONS=3 +AUTH_USER_LIMIT=$(($LATEST+$UTH_USER_LIMIT_VERSIONS*3)) + +# Students licenses only last a year, hence $LIMIT_VERSIONS cannot be more than 2. +NON_AUTH_USER_LIMIT_VERSIONS=2 # Must be 2 +NON_AUTH_USER_LIMIT=$(($LATEST+$NON_AUTH_USER_LIMIT_VERSIONS*3)) + +LIMIT_VERSIONS="${LIMIT_VERSIONS:-0}" +HARD_LIMIT_VERSION=$(($LATEST+$LIMIT_VERSIONS*3)) + +## Started +JSON="{\"include\":[" counter=0 # Loop through each version @@ -29,6 +41,12 @@ for version in "${versions[@]}"; do # 1 based counter ((counter++)) + # Checking hardlimit + if [[ $LIMIT_VERSIONS -ne 0 && $counter -gt $HARD_LIMIT_VERSION ]]; then + echo "Reached limit." + break + fi + if [[ "$version" == *"ubuntu"* ]]; then ON_UBUNTU=true; else @@ -54,15 +72,15 @@ for version in "${versions[@]}"; do add_line="true"; else # Runs only "latest" and last two versions. - # Last 6 registries in list above. - if [[ $counter -le $CUTOUT ]]; then + # Last 6 entries in the list above. + if [[ $counter -le $AUTH_USER_LIMIT ]]; then add_line="true"; else add_line="false"; fi fi else - if [[ $ON_STUDENT == "true" && $counter -le $CUTOUT ]]; then + if [[ $ON_STUDENT == "true" && $counter -le $NON_AUTH_USER_LIMIT ]]; then add_line="true"; else add_line="false"; From dfc50654687ead50da0828f9254d9f6ff7aeabff Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 17:39:25 +0200 Subject: [PATCH 12/22] fix: comments in shell file. --- .ci/build_matrix.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.ci/build_matrix.sh b/.ci/build_matrix.sh index 4e8aca58dd..1413386cf1 100755 --- a/.ci/build_matrix.sh +++ b/.ci/build_matrix.sh @@ -1,6 +1,7 @@ # List of versions versions=( - 'latest-ubuntu' + # if added more "latest", change "$LATEST" + 'latest-ubuntu' 'latest-ubuntu-student' 'v24.2.0' 'v24.2-ubuntu' @@ -17,15 +18,14 @@ versions=( ) - LATEST=2 # for 'latest-ubuntu' and 'latest-ubuntu-student' -# Do not process more than the $CUTOUT versions in above list -UTH_USER_LIMIT_VERSIONS=3 -AUTH_USER_LIMIT=$(($LATEST+$UTH_USER_LIMIT_VERSIONS*3)) +# Do not process more than the $AUTH_USER_LIMIT_VERSIONS versions in above list +AUTH_USER_LIMIT_VERSIONS="${AUTH_USER_LIMIT_VERSIONS:-3}" +AUTH_USER_LIMIT=$(($LATEST+$AUTH_USER_LIMIT_VERSIONS*3)) -# Students licenses only last a year, hence $LIMIT_VERSIONS cannot be more than 2. -NON_AUTH_USER_LIMIT_VERSIONS=2 # Must be 2 +# Students licenses only last a year, hence $NON_AUTH_USER_LIMIT_VERSIONS cannot be more than 2. +NON_AUTH_USER_LIMIT_VERSIONS="${NON_AUTH_USER_LIMIT_VERSIONS:-2}" NON_AUTH_USER_LIMIT=$(($LATEST+$NON_AUTH_USER_LIMIT_VERSIONS*3)) LIMIT_VERSIONS="${LIMIT_VERSIONS:-0}" From a2a1c22eb119bd240f577b77daa0cbc3f024225a Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 17:40:18 +0200 Subject: [PATCH 13/22] feat: adding matrix builder to local and minimal. renaming jobs. --- .github/workflows/ci.yml | 87 ++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 48 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19695b0472..8dbdc8014e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -324,8 +324,8 @@ jobs: run: | .ci/display_logs.sh - build-test-matrix: - name: "Build matrix test" + build-test-remote-matrix: + name: "Build remote test matrix" runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' outputs: @@ -348,14 +348,14 @@ jobs: auth_user: ${{ steps.is_organization_member.outputs.isTeamMember == 'true' }} run: .ci/build_matrix.sh - build-test: + build-test-remote: name: "Remote: Build & test MAPDL ${{ matrix.mapdl-version }} (Extended testing ${{ matrix.extended_testing }})" runs-on: ubuntu-latest - needs: [smoke-tests, build-test-matrix] + needs: [smoke-tests, build-test-remote-matrix] timeout-minutes: 35 strategy: fail-fast: false - matrix: ${{fromJson(needs.build-test-matrix.outputs.matrix)}} + matrix: ${{fromJson(needs.build-test-remote-matrix.outputs.matrix)}} env: PYMAPDL_PORT: 21000 # default won't work on GitHub runners @@ -521,35 +521,42 @@ jobs: run: | .ci/display_logs.sh - build-test-ubuntu: - name: "Local: Build & test on Ubuntu MAPDL ${{ matrix.mapdl-image }} (Extended testing ${{ matrix.extended_testing }})" + build-test-local-minimal-matrix: + name: "Build test matrix for minimal and local" runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' - needs: [smoke-tests] - timeout-minutes: 55 outputs: - pushed: ${{ steps.attatch-to-pr.outputs.pushed }} - committed: ${{ steps.attatch-to-pr.outputs.committed }} - commit_long_sha: ${{ steps.attatch-to-pr.outputs.commit_long_sha }} + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: "Install Git and checkout project" + uses: actions/checkout@v4.1.7 + + - uses: tspascoal/get-user-teams-membership@v3 + id: is_organization_member + with: + username: ${{ github.actor }} + organization: ansys + team: 'pymapdl-developers' + GITHUB_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} + + - id: set-matrix + env: + LIMIT_VERSIONS: 3 + extended_testing: ${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }} + auth_user: ${{ steps.is_organization_member.outputs.isTeamMember == 'true' }} + run: .ci/build_matrix.sh + + build-test-ubuntu-local: + name: "Local: Build & test ${{ matrix.mapdl-image }})" + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + needs: [smoke-tests, build-test-local-minimal-matrix] + timeout-minutes: 55 strategy: fail-fast: false matrix: - mapdl-image: [ - 'v23.2-ubuntu', - 'v24.1-ubuntu', - 'v24.1-ubuntu-student', - 'latest-ubuntu', - 'latest-ubuntu-student', - ] - extended_testing: - - ${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }} - exclude: - - extended_testing: false - mapdl-image: 'v23.2-ubuntu' - - extended_testing: false - mapdl-image: 'v24.1-ubuntu' - - extended_testing: false - mapdl-image: 'latest-ubuntu' + matrix: ${{fromJson(needs.build-test-local-minimal-matrix.outputs.matrix)}} + container: image: ghcr.io/ansys/mapdl:${{ matrix.mapdl-image }} options: -u=0:0 --oom-kill-disable --memory=6656MB --memory-swap=16896MB --shm-size=1gb --entrypoint /bin/bash @@ -664,27 +671,11 @@ jobs: name: "Local: Build & test minimal setup on Ubuntu MAPDL ${{ matrix.mapdl-image }} (Extended testing ${{ matrix.extended_testing }})" runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' - needs: [smoke-tests] + needs: [smoke-tests, build-test-local-minimal-matrix] timeout-minutes: 55 strategy: fail-fast: false - matrix: - mapdl-image: [ - 'v23.2-ubuntu', - 'v24.1-ubuntu', - 'v24.1-ubuntu-student', - 'latest-ubuntu', - 'latest-ubuntu-student', - ] - extended_testing: - - ${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }} - exclude: - - extended_testing: false - mapdl-image: 'v23.2-ubuntu' - - extended_testing: false - mapdl-image: 'v24.1-ubuntu' - - extended_testing: false - mapdl-image: 'latest-ubuntu' + matrix: ${{fromJson(needs.build-test-local-minimal-matrix.outputs.matrix)}} container: image: ghcr.io/ansys/mapdl:${{ matrix.mapdl-image }} options: -u=0:0 --oom-kill-disable --memory=6656MB --memory-swap=16896MB --shm-size=1gb --entrypoint /bin/bash @@ -840,7 +831,7 @@ jobs: package: name: "Package library" - needs: [build-test, build-test-ubuntu, build-test-ubuntu-minimal, docs-build] + needs: [build-test-remote, build-test-ubuntu-local, build-test-ubuntu-minimal, docs-build] runs-on: ubuntu-latest steps: - name: "Build library source and wheel artifacts" @@ -952,7 +943,7 @@ jobs: notify: name: "Notify failed build" - needs: [smoke-tests, docs-build, build-test, build-test-ubuntu, build-test-ubuntu-minimal] + needs: [smoke-tests, docs-build, build-test-remote, build-test-ubuntu-local, build-test-ubuntu-minimal] if: failure() && github.event_name == 'schedule' runs-on: ubuntu-latest steps: From f0b9645345bbc4e79cafce8ee5d940842639e0ed Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 17:57:11 +0200 Subject: [PATCH 14/22] fix: wrong context --- .github/workflows/ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dbdc8014e..2fb3b06b21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -547,15 +547,14 @@ jobs: run: .ci/build_matrix.sh build-test-ubuntu-local: - name: "Local: Build & test ${{ matrix.mapdl-image }})" + name: "Local: Build & test on ${{ matrix.mapdl-image }}" runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' needs: [smoke-tests, build-test-local-minimal-matrix] timeout-minutes: 55 strategy: fail-fast: false - matrix: - matrix: ${{fromJson(needs.build-test-local-minimal-matrix.outputs.matrix)}} + matrix: ${{fromJson(needs.build-test-local-minimal-matrix.outputs.matrix)}} container: image: ghcr.io/ansys/mapdl:${{ matrix.mapdl-image }} @@ -668,7 +667,7 @@ jobs: build-test-ubuntu-minimal: - name: "Local: Build & test minimal setup on Ubuntu MAPDL ${{ matrix.mapdl-image }} (Extended testing ${{ matrix.extended_testing }})" + name: "Local-minimal: Build & test on ${{ matrix.mapdl-image }}" runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' needs: [smoke-tests, build-test-local-minimal-matrix] From 23a0ef79a2ba3be3f9eae96f03d4fe7f787b4c32 Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 18:16:00 +0200 Subject: [PATCH 15/22] feat: moving extended testing calculation to inside shell script. --- .ci/build_matrix.sh | 29 ++++++++++++++++++++++++++--- .github/workflows/ci.yml | 7 ++++++- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.ci/build_matrix.sh b/.ci/build_matrix.sh index 1413386cf1..232e34abf0 100755 --- a/.ci/build_matrix.sh +++ b/.ci/build_matrix.sh @@ -20,6 +20,9 @@ versions=( LATEST=2 # for 'latest-ubuntu' and 'latest-ubuntu-student' +# Run only ubuntu jobs +ONLY_UBUNTU="${ONLY_UBUNTU:-false}" + # Do not process more than the $AUTH_USER_LIMIT_VERSIONS versions in above list AUTH_USER_LIMIT_VERSIONS="${AUTH_USER_LIMIT_VERSIONS:-3}" AUTH_USER_LIMIT=$(($LATEST+$AUTH_USER_LIMIT_VERSIONS*3)) @@ -28,13 +31,23 @@ AUTH_USER_LIMIT=$(($LATEST+$AUTH_USER_LIMIT_VERSIONS*3)) NON_AUTH_USER_LIMIT_VERSIONS="${NON_AUTH_USER_LIMIT_VERSIONS:-2}" NON_AUTH_USER_LIMIT=$(($LATEST+$NON_AUTH_USER_LIMIT_VERSIONS*3)) +# Hard limit version. Generally do not process more than $HARD_LIMIT_VERSION LIMIT_VERSIONS="${LIMIT_VERSIONS:-0}" HARD_LIMIT_VERSION=$(($LATEST+$LIMIT_VERSIONS*3)) -## Started -JSON="{\"include\":[" +# Checking if extended testing must be done +# +if [[ $ON_SCHEDULE || ( $ON_WORKFLOW_DISPATCH && $RUN_ALL_TEST ) || ( $ON_PUSH && $HAS_TAG ) ]]; then + extended_testing=true +else + extended_testing=false +fi + +## Start +JSON="{\"include\":[" counter=0 + # Loop through each version for version in "${versions[@]}"; do @@ -47,6 +60,7 @@ for version in "${versions[@]}"; do break fi + # checking version config if [[ "$version" == *"ubuntu"* ]]; then ON_UBUNTU=true; else @@ -59,6 +73,7 @@ for version in "${versions[@]}"; do ON_STUDENT=false; fi + # Printing echo "Processing $counter" echo " - Version: $version" echo " - extended_testing: $extended_testing" @@ -66,6 +81,13 @@ for version in "${versions[@]}"; do echo " - Student: $ON_STUDENT" echo " - Ubuntu: $ON_UBUNTU" + # Early exiting if on Ubuntu only + if [[ "$ON_UBUNTU" != "true" && "$ONLY_UBUNTU" == "true" ]]; then + echo "Skipping non-ubuntu versions" + continue + fi + + # main logic if [[ "$auth_user" == "true" ]]; then if [[ "$extended_testing" == "true" ]]; then # runs everything @@ -87,6 +109,7 @@ for version in "${versions[@]}"; do fi fi + # Add line to json if [[ "$add_line" == "true" ]]; then JSONline="{\"mapdl-version\": \"$version\"}," @@ -100,7 +123,7 @@ for version in "${versions[@]}"; do echo "NOT added line" fi echo "" - + done # Remove last "," and add closing brackets diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fb3b06b21..efaa84457e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -541,8 +541,13 @@ jobs: - id: set-matrix env: + ONLY_UBUNTU: true LIMIT_VERSIONS: 3 - extended_testing: ${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }} + ON_SCHEDULE: ${{ github.event_name == 'schedule' }} + ON_WORKFLOW_DISPATCH: ${{ github.event_name == 'workflow_dispatch' }} + RUN_ALL_TEST: ${{ inputs.run_all_tests }} + ON_PUSH: ${{ github.event_name == 'push' }} + HAS_TAG: ${{ contains(github.ref, 'refs/tags') }} auth_user: ${{ steps.is_organization_member.outputs.isTeamMember == 'true' }} run: .ci/build_matrix.sh From 1af049ef6895c47ae61316a79c8c6f37e111ca9a Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 18:27:12 +0200 Subject: [PATCH 16/22] fix: wrong matrix name --- .github/workflows/ci.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efaa84457e..57ccc28c0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -349,13 +349,13 @@ jobs: run: .ci/build_matrix.sh build-test-remote: - name: "Remote: Build & test MAPDL ${{ matrix.mapdl-version }} (Extended testing ${{ matrix.extended_testing }})" + name: "Remote: Build & test MAPDL ${{ matrix.mapdl-version }}" runs-on: ubuntu-latest needs: [smoke-tests, build-test-remote-matrix] timeout-minutes: 35 strategy: fail-fast: false - matrix: ${{fromJson(needs.build-test-remote-matrix.outputs.matrix)}} + matrix: ${{ fromJson(needs.build-test-remote-matrix.outputs.matrix) }} env: PYMAPDL_PORT: 21000 # default won't work on GitHub runners @@ -552,7 +552,7 @@ jobs: run: .ci/build_matrix.sh build-test-ubuntu-local: - name: "Local: Build & test on ${{ matrix.mapdl-image }}" + name: "Local: Build & test on ${{ matrix.mapdl-version }}" runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' needs: [smoke-tests, build-test-local-minimal-matrix] @@ -562,7 +562,7 @@ jobs: matrix: ${{fromJson(needs.build-test-local-minimal-matrix.outputs.matrix)}} container: - image: ghcr.io/ansys/mapdl:${{ matrix.mapdl-image }} + image: ghcr.io/ansys/mapdl:${{ matrix.mapdl-version }} options: -u=0:0 --oom-kill-disable --memory=6656MB --memory-swap=16896MB --shm-size=1gb --entrypoint /bin/bash credentials: username: ${{ github.actor }} @@ -624,7 +624,7 @@ jobs: xvfb-run pytest -k "not test_dpf" \ ${{ env.PYTEST_ARGUMENTS }} \ --reset_only_failed --add_missing_images \ - --cov-report=xml:${{ matrix.mapdl-image }}-local.xml + --cov-report=xml:${{ matrix.mapdl-version }}-local.xml - name: "Adding the directory as safe directory for later step" run: | @@ -661,18 +661,18 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} # required root_dir: ${{ github.workspace }} - name: ${{ matrix.mapdl-image }}-local.xml - flags: ubuntu,local,${{ matrix.mapdl-image }} + name: ${{ matrix.mapdl-version }}-local.xml + flags: ubuntu,local,${{ matrix.mapdl-version }} - name: "Upload coverage artifacts" uses: actions/upload-artifact@v4 with: - name: ${{ matrix.mapdl-image }}-local.xml - path: ./${{ matrix.mapdl-image }}-local.xml + name: ${{ matrix.mapdl-version }}-local.xml + path: ./${{ matrix.mapdl-version }}-local.xml build-test-ubuntu-minimal: - name: "Local-minimal: Build & test on ${{ matrix.mapdl-image }}" + name: "Local-minimal: Build & test on ${{ matrix.mapdl-version }}" runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' needs: [smoke-tests, build-test-local-minimal-matrix] @@ -681,7 +681,7 @@ jobs: fail-fast: false matrix: ${{fromJson(needs.build-test-local-minimal-matrix.outputs.matrix)}} container: - image: ghcr.io/ansys/mapdl:${{ matrix.mapdl-image }} + image: ghcr.io/ansys/mapdl:${{ matrix.mapdl-version }} options: -u=0:0 --oom-kill-disable --memory=6656MB --memory-swap=16896MB --shm-size=1gb --entrypoint /bin/bash credentials: username: ${{ github.actor }} @@ -730,10 +730,10 @@ jobs: # Because there is no 'ansys-tools-path' we need to input the # executable path with the env var: PYMAPDL_MAPDL_EXEC. - if [[ "${{ matrix.mapdl-image }}" == *"latest-ubuntu"* ]] ; then + if [[ "${{ matrix.mapdl-version }}" == *"latest-ubuntu"* ]] ; then version="242" else - version=$(echo "${{ matrix.mapdl-image }}" | head -c 5 | tail -c 4 | tr -d '.') + version=$(echo "${{ matrix.mapdl-version }}" | head -c 5 | tail -c 4 | tr -d '.') fi; echo "$version" @@ -744,21 +744,21 @@ jobs: unset PYMAPDL_START_INSTANCE pytest -k "not test_dpf" \ ${{ env.PYTEST_ARGUMENTS }} \ - --cov-report=xml:${{ matrix.mapdl-image }}-minimal.xml + --cov-report=xml:${{ matrix.mapdl-version }}-minimal.xml - uses: codecov/codecov-action@v4 name: "Upload coverage to Codecov" with: token: ${{ secrets.CODECOV_TOKEN }} # required root_dir: ${{ github.workspace }} - name: ${{ matrix.mapdl-image }}-minimal.xml - flags: ubuntu,local,${{ matrix.mapdl-image }},minimal + name: ${{ matrix.mapdl-version }}-minimal.xml + flags: ubuntu,local,${{ matrix.mapdl-version }},minimal - name: "Upload coverage artifacts" uses: actions/upload-artifact@v4 with: - name: ${{ matrix.mapdl-image }}-minimal.xml - path: ./${{ matrix.mapdl-image }}-minimal.xml + name: ${{ matrix.mapdl-version }}-minimal.xml + path: ./${{ matrix.mapdl-version }}-minimal.xml test-windows: From ff4432ccfaa476224579b6e507bf759a36916d72 Mon Sep 17 00:00:00 2001 From: German Date: Fri, 28 Jun 2024 18:42:29 +0200 Subject: [PATCH 17/22] fix: coverage issues --- .ci/build_matrix.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.ci/build_matrix.sh b/.ci/build_matrix.sh index 232e34abf0..4faead2cb2 100755 --- a/.ci/build_matrix.sh +++ b/.ci/build_matrix.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # List of versions versions=( # if added more "latest", change "$LATEST" @@ -17,7 +19,6 @@ versions=( 'v22.2-ubuntu' ) - LATEST=2 # for 'latest-ubuntu' and 'latest-ubuntu-student' # Run only ubuntu jobs @@ -25,15 +26,15 @@ ONLY_UBUNTU="${ONLY_UBUNTU:-false}" # Do not process more than the $AUTH_USER_LIMIT_VERSIONS versions in above list AUTH_USER_LIMIT_VERSIONS="${AUTH_USER_LIMIT_VERSIONS:-3}" -AUTH_USER_LIMIT=$(($LATEST+$AUTH_USER_LIMIT_VERSIONS*3)) +AUTH_USER_LIMIT=$((LATEST+AUTH_USER_LIMIT_VERSIONS*3)) # Students licenses only last a year, hence $NON_AUTH_USER_LIMIT_VERSIONS cannot be more than 2. NON_AUTH_USER_LIMIT_VERSIONS="${NON_AUTH_USER_LIMIT_VERSIONS:-2}" -NON_AUTH_USER_LIMIT=$(($LATEST+$NON_AUTH_USER_LIMIT_VERSIONS*3)) +NON_AUTH_USER_LIMIT=$((LATEST+NON_AUTH_USER_LIMIT_VERSIONS*3)) # Hard limit version. Generally do not process more than $HARD_LIMIT_VERSION LIMIT_VERSIONS="${LIMIT_VERSIONS:-0}" -HARD_LIMIT_VERSION=$(($LATEST+$LIMIT_VERSIONS*3)) +HARD_LIMIT_VERSION=$((LATEST+LIMIT_VERSIONS*3)) # Checking if extended testing must be done # @@ -131,7 +132,7 @@ if [[ $JSON == *, ]]; then JSON="${JSON%?}" fi JSON="$JSON]}" -echo $JSON +echo "$JSON" # Set output echo "matrix=$( echo "$JSON" )" >> $GITHUB_OUTPUT \ No newline at end of file From 09aa86863bbd6965d45771977ec448697e453bb4 Mon Sep 17 00:00:00 2001 From: German Date: Mon, 1 Jul 2024 10:07:59 +0200 Subject: [PATCH 18/22] ci: renaming the jobs so they fit in the summary map --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57ccc28c0a..c525790dbc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,7 +111,7 @@ jobs: smoke-tests: - name: "Build and smoke test (${{ matrix.os }} | Python ${{ matrix.python-version }}) (Release=${{ matrix.should-release }})" + name: "${{ matrix.os }} | Py ${{ matrix.python-version }} | Rel ${{ matrix.should-release }}" runs-on: ${{ matrix.os }} if: github.ref != 'refs/heads/main' timeout-minutes: 20 @@ -349,7 +349,7 @@ jobs: run: .ci/build_matrix.sh build-test-remote: - name: "Remote: Build & test MAPDL ${{ matrix.mapdl-version }}" + name: "Remote: ${{ matrix.mapdl-version }}" runs-on: ubuntu-latest needs: [smoke-tests, build-test-remote-matrix] timeout-minutes: 35 @@ -552,7 +552,7 @@ jobs: run: .ci/build_matrix.sh build-test-ubuntu-local: - name: "Local: Build & test on ${{ matrix.mapdl-version }}" + name: "Local: ${{ matrix.mapdl-version }}" runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' needs: [smoke-tests, build-test-local-minimal-matrix] @@ -672,7 +672,7 @@ jobs: build-test-ubuntu-minimal: - name: "Local-minimal: Build & test on ${{ matrix.mapdl-version }}" + name: "Local-min: ${{ matrix.mapdl-version }}" runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' needs: [smoke-tests, build-test-local-minimal-matrix] @@ -960,7 +960,7 @@ jobs: test_julia: - name: "Test julia implementation" + name: "Julia ${{ matrix.julia-version }} | ${{ matrix.os }}" runs-on: ${{ matrix.os }} if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' strategy: From 8caed0464c4ab533fd1ad37f79a95f910986ec1b Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Mon, 8 Jul 2024 10:55:11 +0200 Subject: [PATCH 19/22] fix: adding permission to read user --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7236a3adf8..bbccbada85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -334,6 +334,8 @@ jobs: if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} + permissions: + discussions: read steps: - name: "Install Git and checkout project" uses: actions/checkout@v4.1.7 From 568fadf0db26eff4832afdca4c38d020322d208b Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Mon, 8 Jul 2024 10:56:44 +0200 Subject: [PATCH 20/22] fix: using github token --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbccbada85..cf46849f47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -346,7 +346,7 @@ jobs: username: ${{ github.actor }} organization: ansys team: 'pymapdl-developers' - GITHUB_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - id: set-matrix env: From 4a675341c209f70f6b399d83bd78b5aa4ee6bef9 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Mon, 8 Jul 2024 11:43:00 +0200 Subject: [PATCH 21/22] fix: using a token for auth --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf46849f47..5021892560 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -346,7 +346,7 @@ jobs: username: ${{ github.actor }} organization: ansys team: 'pymapdl-developers' - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.TOKEN_TEAMS_USER_READ }} - id: set-matrix env: From 283916f620ddf261f37659ecc4779be008c28df4 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Mon, 8 Jul 2024 12:00:17 +0200 Subject: [PATCH 22/22] fix: using token for both jobs --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5021892560..5a1486c978 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -334,8 +334,7 @@ jobs: if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} - permissions: - discussions: read + steps: - name: "Install Git and checkout project" uses: actions/checkout@v4.1.7 @@ -569,7 +568,7 @@ jobs: username: ${{ github.actor }} organization: ansys team: 'pymapdl-developers' - GITHUB_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.TOKEN_TEAMS_USER_READ }} - id: set-matrix env: