From f1dc16bdc1ba2833c1134deb05560076f9624889 Mon Sep 17 00:00:00 2001 From: tundranerd Date: Sat, 2 Mar 2024 12:34:41 -0700 Subject: [PATCH 01/10] Ci/pull request test (#4) * Linux push and pull_request workflows * OIDC for AWS --- FEBio/breakpoint.cpp | 3 +-- ci/Linux/build.sh | 3 ++- ci/Linux/create-sdk.sh | 1 + ci/Linux/publish-to-s3.sh | 2 +- ci/Linux/scp-to-repo.sh | 1 + ci/Linux/test.sh | 1 + 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/FEBio/breakpoint.cpp b/FEBio/breakpoint.cpp index 2512028fc..456d073db 100644 --- a/FEBio/breakpoint.cpp +++ b/FEBio/breakpoint.cpp @@ -170,7 +170,6 @@ int check_break(int nwhen, double t) return i; } } - } - + } return -1; } diff --git a/ci/Linux/build.sh b/ci/Linux/build.sh index 9856a3f70..b344e349d 100755 --- a/ci/Linux/build.sh +++ b/ci/Linux/build.sh @@ -1,6 +1,7 @@ #! /bin/bash # Uncomment next line if not global on target machine -git config --global --add safe.directory /FEBio +set -e +#git config --global --add safe.directory /FEBio source "/opt/intel/oneapi/setvars.sh" --force cmake . -B cmbuild -LA pushd cmbuild diff --git a/ci/Linux/create-sdk.sh b/ci/Linux/create-sdk.sh index 66126a0dc..046500492 100755 --- a/ci/Linux/create-sdk.sh +++ b/ci/Linux/create-sdk.sh @@ -1,4 +1,5 @@ #! /bin/bash +set -e TARGET_DIR="${TARGET_DIR:-febio4-sdk}" mkdir -p ${TARGET_DIR}/{include,lib,bin} # Gotta use rsync macos cp doesn't support --parent diff --git a/ci/Linux/publish-to-s3.sh b/ci/Linux/publish-to-s3.sh index 31f9df5b8..2349425d9 100755 --- a/ci/Linux/publish-to-s3.sh +++ b/ci/Linux/publish-to-s3.sh @@ -1,5 +1,5 @@ #! /bin/bash - +set -e chmod +x artifacts/febio/bin/febio4 ci/common/linux/publish-to-s3.sh artifacts/febio4 ci/common/linux/publish-to-s3.sh artifacts/febio4-sdk diff --git a/ci/Linux/scp-to-repo.sh b/ci/Linux/scp-to-repo.sh index 023e01643..1c4b5a534 100755 --- a/ci/Linux/scp-to-repo.sh +++ b/ci/Linux/scp-to-repo.sh @@ -1,4 +1,5 @@ #! /bin/bash +set -e scp cmbuild/bin/* repo:~/update2/FEBioStudio2Dev/Linux/stage/bin scp cmbuild/lib/* repo:~/update2/FEBioStudio2Dev/Linux/stage/lib ssh repo "chmod +x update2/FEBioStudio2Dev/Linux/stage/bin/febio4" diff --git a/ci/Linux/test.sh b/ci/Linux/test.sh index 192b6f05e..f24b55e2e 100755 --- a/ci/Linux/test.sh +++ b/ci/Linux/test.sh @@ -1,5 +1,6 @@ #! /bin/bash # Uncomment next line if not global on target machine +set -e source "/opt/intel/oneapi/setvars.sh" --force ls -lr cmbuild chmod +x cmbuild/bin/febio4 From 88dcd995bffc2ffdae6cc29506a223f402837fe5 Mon Sep 17 00:00:00 2001 From: John Haynes Date: Sat, 2 Mar 2024 12:39:43 -0700 Subject: [PATCH 02/10] Use OIDC branch for workflows --- .github/workflows/linux-pull-request.yml | 2 +- .github/workflows/linux-push.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-pull-request.yml b/.github/workflows/linux-pull-request.yml index e3efb7211..445462d9c 100644 --- a/.github/workflows/linux-pull-request.yml +++ b/.github/workflows/linux-pull-request.yml @@ -11,7 +11,7 @@ permissions: contents: read # This is required for actions/checkout jobs: call_workflow: - uses: tundranerd/febio-workflows/.github/workflows/linux-reusable-pull-request.yml@develop + uses: tundranerd/febio-workflows/.github/workflows/linux-reusable-pull-request.yml@oidc-wip-aws with: runTests: true package-name: febio4 diff --git a/.github/workflows/linux-push.yml b/.github/workflows/linux-push.yml index 1d0e1b8be..74d8b3f6c 100644 --- a/.github/workflows/linux-push.yml +++ b/.github/workflows/linux-push.yml @@ -16,7 +16,7 @@ permissions: contents: read # This is required for actions/checkout jobs: call_workflow: - uses: tundranerd/febio-workflows/.github/workflows/linux-reusable-push.yml@develop + uses: tundranerd/febio-workflows/.github/workflows/linux-reusable-push.yml@oidc-wip-aws with: runTests: ${{ inputs.runTests == 'true' }} package-name: febio4 From 6795867cca3dad0bbb01d046957795f96e4bd067 Mon Sep 17 00:00:00 2001 From: John Haynes Date: Sat, 2 Mar 2024 12:57:28 -0700 Subject: [PATCH 03/10] Trigger build From 9bcd5164b897a8d8a7d09152847e28cbbe195584 Mon Sep 17 00:00:00 2001 From: John Haynes Date: Sat, 2 Mar 2024 13:03:09 -0700 Subject: [PATCH 04/10] Trigger build From da1758494eaac20cc4fb0d241c67251d0de4c7b6 Mon Sep 17 00:00:00 2001 From: John Haynes Date: Sat, 2 Mar 2024 13:10:03 -0700 Subject: [PATCH 05/10] Trigger build From 87bdea3727864dbd9d44a3f4d5e992f496ed607e Mon Sep 17 00:00:00 2001 From: John Haynes Date: Sat, 2 Mar 2024 13:58:19 -0700 Subject: [PATCH 06/10] Chmod correct path for febio4 --- ci/Linux/publish-to-s3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/Linux/publish-to-s3.sh b/ci/Linux/publish-to-s3.sh index 2349425d9..a7c83fae4 100755 --- a/ci/Linux/publish-to-s3.sh +++ b/ci/Linux/publish-to-s3.sh @@ -1,5 +1,5 @@ #! /bin/bash set -e -chmod +x artifacts/febio/bin/febio4 +chmod +x artifacts/febio4/bin/febio4 ci/common/linux/publish-to-s3.sh artifacts/febio4 ci/common/linux/publish-to-s3.sh artifacts/febio4-sdk From 41fbdf69256fcfb9eb7e60cd5d0658fc950f73b7 Mon Sep 17 00:00:00 2001 From: John Haynes Date: Sat, 2 Mar 2024 15:13:51 -0700 Subject: [PATCH 07/10] OIDC for Windows --- .github/workflows/windows-pull-request.yml | 2 +- .github/workflows/windows-push.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-pull-request.yml b/.github/workflows/windows-pull-request.yml index bdcfe0f18..14a04a9b3 100644 --- a/.github/workflows/windows-pull-request.yml +++ b/.github/workflows/windows-pull-request.yml @@ -12,7 +12,7 @@ permissions: contents: read # This is required for actions/checkout jobs: call_workflow: - uses: febiosoftware/febio-workflows/.github/workflows/windows-reusable.yml@develop + uses: febiosoftware/febio-workflows/.github/workflows/windows-reusable-pull-request.yml@develop with: runTests: true package-name: febio4 diff --git a/.github/workflows/windows-push.yml b/.github/workflows/windows-push.yml index 29fec1ac5..6557f6a16 100644 --- a/.github/workflows/windows-push.yml +++ b/.github/workflows/windows-push.yml @@ -17,7 +17,7 @@ permissions: contents: read # This is required for actions/checkout jobs: call_workflow: - uses: febiosoftware/febio-workflows/.github/workflows/windows-reusable.yml@develop + uses: tundranerd/febio-workflows/.github/workflows/windows-reusable-push.yml@oidc-wip-aws with: runTests: ${{ inputs.runTests == 'true' }} package-name: febio4 From a3832573f91a6eefcad9f842db6ff4eeb4f07ff9 Mon Sep 17 00:00:00 2001 From: John Haynes Date: Sat, 2 Mar 2024 15:27:45 -0700 Subject: [PATCH 08/10] Trigger workflow From f83ab708323f89964aeed02961913c54e7581077 Mon Sep 17 00:00:00 2001 From: John Haynes Date: Sat, 2 Mar 2024 16:21:23 -0700 Subject: [PATCH 09/10] OIDC MacOS push and pull_request --- .github/workflows/macos-pull-request.yml | 2 +- .github/workflows/macos-push.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos-pull-request.yml b/.github/workflows/macos-pull-request.yml index 7dae81c2b..ded1ffd5d 100644 --- a/.github/workflows/macos-pull-request.yml +++ b/.github/workflows/macos-pull-request.yml @@ -11,7 +11,7 @@ permissions: contents: read # This is required for actions/checkout jobs: call_workflow: - uses: tundranerd/febio-workflows/.github/workflows/macos-reusable.yml@develop + uses: tundranerd/febio-workflows/.github/workflows/macos-reusable-pull-request.yml@oidc-wip-aws with: runTests: true package-name: febio4 diff --git a/.github/workflows/macos-push.yml b/.github/workflows/macos-push.yml index 77e41d82c..dc945e4aa 100644 --- a/.github/workflows/macos-push.yml +++ b/.github/workflows/macos-push.yml @@ -15,7 +15,7 @@ permissions: contents: read # This is required for actions/checkout jobs: call_workflow: - uses: tundranerd/febio-workflows/.github/workflows/macos-reusable.yml@develop + uses: tundranerd/febio-workflows/.github/workflows/macos-reusable-push.yml@oidc-wip-aws with: runTests: ${{ inputs.runTests == 'true' }} package-name: febio4 From 64c5843cb1cb7769f1b7139811fec8c1ff75b846 Mon Sep 17 00:00:00 2001 From: John Haynes Date: Sat, 2 Mar 2024 16:21:23 -0700 Subject: [PATCH 10/10] OIDC MacOS push and pull_request --- .github/workflows/macos-pull-request.yml | 2 +- .github/workflows/windows-pull-request.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos-pull-request.yml b/.github/workflows/macos-pull-request.yml index ded1ffd5d..3c3c763c2 100644 --- a/.github/workflows/macos-pull-request.yml +++ b/.github/workflows/macos-pull-request.yml @@ -1,6 +1,6 @@ name: CI - MacOS Pull Request on: - pull_request: + pull_request_target: types: - opened - edited diff --git a/.github/workflows/windows-pull-request.yml b/.github/workflows/windows-pull-request.yml index 14a04a9b3..83e72b8d9 100644 --- a/.github/workflows/windows-pull-request.yml +++ b/.github/workflows/windows-pull-request.yml @@ -1,7 +1,7 @@ name: CI - Windows Pull Request on: - pull_request: + pull_request_target: types: - opened - edited @@ -12,7 +12,7 @@ permissions: contents: read # This is required for actions/checkout jobs: call_workflow: - uses: febiosoftware/febio-workflows/.github/workflows/windows-reusable-pull-request.yml@develop + uses: tundranerd/febio-workflows/.github/workflows/windows-reusable-pull-request.yml@oidc-wip-aws with: runTests: true package-name: febio4