From 2194e5f86412e5a32ee4c9115a6695cc412eb69f Mon Sep 17 00:00:00 2001 From: Asra Naseem <39022476+asra-naseem@users.noreply.github.com> Date: Tue, 5 Sep 2023 08:24:04 -0600 Subject: [PATCH 01/12] Checking CI/CD workflow --- .github/workflows/github_actions.yml | 56 ++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/github_actions.yml diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml new file mode 100644 index 0000000..1576849 --- /dev/null +++ b/.github/workflows/github_actions.yml @@ -0,0 +1,56 @@ +name: C/C++ CI + +on: + push +jobs: + example_matrix: + strategy: + matrix: + os: [windows-latest] + python-version: ["3.10"] + compiler: [gcc-12] + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash # Use bash for all run steps by default + steps: + - uses: actions/checkout@v3 + + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install compiler + id: install_cc + uses: rlalik/setup-cpp-compiler@master + with: + compiler: ${{ matrix.compiler }} + + - name: Install dependencies + run: | + pip install pandas + pip install "pybind11[global]" + pip install cvxopt + pip install "OpenDSSDirect.py[extras]" + pip install helics + pip install numpy + + - name: Configure build + run: | + # Windows specific commands + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=$HOME/my-project-installation .. + cmake --build . --config Release --parallel 4 + cmake --install . + + + - name: Run ctest + run: | + + dir + cd build + cd unittests + dir + ctest --output-on-failure -C Release From 95a6d2ced82b7e9e65be0fd28f085337cb2de7e4 Mon Sep 17 00:00:00 2001 From: Asra Naseem <39022476+asra-naseem@users.noreply.github.com> Date: Thu, 7 Sep 2023 12:34:31 -0600 Subject: [PATCH 02/12] Removed ctest from the script --- .github/workflows/github_actions.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 1576849..252e4b9 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -46,11 +46,4 @@ jobs: cmake --install . - - name: Run ctest - run: | - - dir - cd build - cd unittests - dir - ctest --output-on-failure -C Release + From 8222605756159846692176af5c5d3f5ced66d15f Mon Sep 17 00:00:00 2001 From: Asra Naseem <39022476+asra-naseem@users.noreply.github.com> Date: Thu, 7 Sep 2023 13:08:44 -0600 Subject: [PATCH 03/12] adding step to execute start_execute.py --- .github/workflows/github_actions.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 252e4b9..6caa2f2 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -1,7 +1,8 @@ name: C/C++ CI on: - push + push + jobs: example_matrix: strategy: @@ -38,12 +39,12 @@ jobs: - name: Configure build run: | - # Windows specific commands - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=$HOME/my-project-installation .. - cmake --build . --config Release --parallel 4 - cmake --install . - - - + # Windows specific commands + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=$HOME/my-project-installation .. + cmake --build . --config Release --parallel 4 + cmake --install . + + - name: Start Execute Script + run: python start_execute.py From 2ba2a6d8b037f8b1b05afca745ff23a11cdd0647 Mon Sep 17 00:00:00 2001 From: Asra Naseem <39022476+asra-naseem@users.noreply.github.com> Date: Thu, 7 Sep 2023 13:15:21 -0600 Subject: [PATCH 04/12] Correcting start_execution.py --- .github/workflows/github_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 6caa2f2..3388115 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -47,4 +47,4 @@ jobs: cmake --install . - name: Start Execute Script - run: python start_execute.py + run: python start_execution.py From ac1d4217321fdb4dfcb94046f41f9bef1697f938 Mon Sep 17 00:00:00 2001 From: Manoj Kumar Cebol Sundarrajan Date: Mon, 11 Sep 2023 12:52:12 -0600 Subject: [PATCH 05/12] Update github_actions.yml --- .github/workflows/github_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 3388115..40c4549 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -42,7 +42,7 @@ jobs: # Windows specific commands mkdir build cd build - cmake -DCMAKE_INSTALL_PREFIX=$HOME/my-project-installation .. + cmake -DICM=ON -DCMAKE_INSTALL_PREFIX=$HOME/my-project-installation .. cmake --build . --config Release --parallel 4 cmake --install . From 9138879c41d0bcb0ba97e5aaee13d222ef043ccc Mon Sep 17 00:00:00 2001 From: Asra Naseem <39022476+asra-naseem@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:10:42 -0600 Subject: [PATCH 06/12] added MSVC compiler --- .github/workflows/github_actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 40c4549..515f551 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -8,8 +8,8 @@ jobs: strategy: matrix: os: [windows-latest] - python-version: ["3.10"] - compiler: [gcc-12] + python-version: ["3.6",3.10"] + compiler: [MSVC] runs-on: ${{ matrix.os }} defaults: run: From f5ab819709bd116fc25cf2a6ab06943de277febc Mon Sep 17 00:00:00 2001 From: Asra Naseem <39022476+asra-naseem@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:12:45 -0600 Subject: [PATCH 07/12] changed python version --- .github/workflows/github_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 515f551..5e26f30 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [windows-latest] - python-version: ["3.6",3.10"] + python-version: ["3.10"] compiler: [MSVC] runs-on: ${{ matrix.os }} defaults: From e53c572f5a7a10defdb26c56a50bbdaa544af8d5 Mon Sep 17 00:00:00 2001 From: Asra Naseem <39022476+asra-naseem@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:22:15 -0600 Subject: [PATCH 08/12] Update github_actions.yml --- .github/workflows/github_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 5e26f30..a26732b 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -9,7 +9,7 @@ jobs: matrix: os: [windows-latest] python-version: ["3.10"] - compiler: [MSVC] + runs-on: ${{ matrix.os }} defaults: run: From e826d5bfe604d9c14138ccaf91827f29f20c5754 Mon Sep 17 00:00:00 2001 From: Asra Naseem <39022476+asra-naseem@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:30:33 -0600 Subject: [PATCH 09/12] Corrected Compiler --- .github/workflows/github_actions.yml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index a26732b..54ed8ba 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -9,11 +9,12 @@ jobs: matrix: os: [windows-latest] python-version: ["3.10"] - + runs-on: ${{ matrix.os }} defaults: run: - shell: bash # Use bash for all run steps by default + shell: cmd # Switch to cmd since we are on Windows and using MSVC + steps: - uses: actions/checkout@v3 @@ -22,27 +23,16 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install compiler - id: install_cc - uses: rlalik/setup-cpp-compiler@master - with: - compiler: ${{ matrix.compiler }} - - name: Install dependencies run: | - pip install pandas - pip install "pybind11[global]" - pip install cvxopt - pip install "OpenDSSDirect.py[extras]" - pip install helics - pip install numpy - - - name: Configure build + pip install -r requirements.txt + + - name: Configure build with MSVC run: | - # Windows specific commands + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" mkdir build cd build - cmake -DICM=ON -DCMAKE_INSTALL_PREFIX=$HOME/my-project-installation .. + cmake -G "Visual Studio 16 2019" -A x64 -DICM=ON -DCMAKE_INSTALL_PREFIX=%USERPROFILE%/my-project-installation .. cmake --build . --config Release --parallel 4 cmake --install . From 3c3a50066d6717286054dbe390751c592bdd6fa9 Mon Sep 17 00:00:00 2001 From: Asra Naseem <39022476+asra-naseem@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:32:54 -0600 Subject: [PATCH 10/12] Corrected --- .github/workflows/github_actions.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 54ed8ba..4cbf307 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -25,7 +25,13 @@ jobs: - name: Install dependencies run: | - pip install -r requirements.txt + run: | + pip install pandas + pip install "pybind11[global]" + pip install cvxopt + pip install "OpenDSSDirect.py[extras]" + pip install helics + pip install numpy - name: Configure build with MSVC run: | From f9e6d5f237fa63c23401ba6e56168630b1848ac9 Mon Sep 17 00:00:00 2001 From: Asra Naseem <39022476+asra-naseem@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:34:24 -0600 Subject: [PATCH 11/12] updated build --- .github/workflows/github_actions.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 4cbf307..f30e432 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -25,7 +25,6 @@ jobs: - name: Install dependencies run: | - run: | pip install pandas pip install "pybind11[global]" pip install cvxopt From 1db26abe9329fef7a9270fa9192c2bf82ea9353b Mon Sep 17 00:00:00 2001 From: Asra Naseem <39022476+asra-naseem@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:37:47 -0600 Subject: [PATCH 12/12] update build --- .github/workflows/github_actions.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index f30e432..5443d7f 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -32,12 +32,12 @@ jobs: pip install helics pip install numpy - - name: Configure build with MSVC + - name: Configure build run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + # Windows specific commands mkdir build cd build - cmake -G "Visual Studio 16 2019" -A x64 -DICM=ON -DCMAKE_INSTALL_PREFIX=%USERPROFILE%/my-project-installation .. + cmake -DICM=ON -DCMAKE_INSTALL_PREFIX=$HOME/my-project-installation .. cmake --build . --config Release --parallel 4 cmake --install .