From 26fa5409c2a8f1c0d349261dbe354a0ed3d6553e Mon Sep 17 00:00:00 2001 From: Joseph D Hughes Date: Tue, 18 Jun 2024 11:12:26 -0500 Subject: [PATCH 1/6] ci: fix schedule for windows --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++----------------- autotest/test_cli_cmds.py | 2 +- pixi.toml | 5 ++++- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49a8001..601ef5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,19 +27,19 @@ jobs: matrix: include: # test latest gcc and python - - {os: ubuntu-latest, FC: gcc, FC_V: 13} - - {os: macos-latest, FC: gcc, FC_V: 13} - - {os: windows-latest, FC: gcc, FC_V: 13} + - {os: ubuntu-latest, FC: gcc, FC_V: 13, shell: bash} + - {os: macos-latest, FC: gcc, FC_V: 13, shell: bash} + - {os: windows-latest, FC: gcc, FC_V: 13, shell: pwsh} # test latest python and intel-classic - - {os: ubuntu-latest, FC: intel-classic, FC_V: 2021.7} - - {os: macos-13, FC: intel-classic, FC_V: 2021.7} - - {os: windows-2019, FC: intel-classic, FC_V: 2021.7} + - {os: ubuntu-latest, FC: intel-classic, FC_V: 2021.7, shell: bash} + - {os: macos-13, FC: intel-classic, FC_V: 2021.7, shell: bash} + - {os: windows-2019, FC: intel-classic, FC_V: 2021.7, shell: pwsh} # test latest python and previous gcc - - {os: ubuntu-latest, FC: gcc, FC_V: 12} - - {os: ubuntu-latest, FC: gcc, FC_V: 11} + - {os: ubuntu-latest, FC: gcc, FC_V: 12, shell: bash} + - {os: ubuntu-latest, FC: gcc, FC_V: 11, shell: bash} defaults: run: - shell: bash + shell: ${{ matrix.shell }} steps: - name: Checkout repo @@ -91,7 +91,6 @@ jobs: - name: test on Windows if: runner.os == 'Windows' - shell: pwsh run: | pixi run autotest-base @@ -115,23 +114,23 @@ jobs: pymake-schedule: name: pymake scheduled - if: ${{ github.event_name == 'schedule' }} + # if: ${{ github.event_name == 'schedule' }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: # test latest gcc and python - - {os: ubuntu-latest, FC: gcc, FC_V: 13} - - {os: macos-latest, FC: gcc, FC_V: 13} - - {os: windows-latest, FC: gcc, FC_V: 13} + - {os: ubuntu-latest, FC: gcc, FC_V: 13, shell: bash} + - {os: macos-latest, FC: gcc, FC_V: 13, shell: bash} + - {os: windows-2019, FC: gcc, FC_V: 13, shell: pwsh} # test latest python and intel - - {os: ubuntu-latest, FC: intel-classic, FC_V: 2021.7} - - {os: macos-13, FC: intel-classic, FC_V: 2021.7} - - {os: windows-2019, FC: intel-classic, FC_V: 2021.7} + - {os: ubuntu-latest, FC: intel-classic, FC_V: 2021.7, shell: bash} + - {os: macos-13, FC: intel-classic, FC_V: 2021.7, shell: bash} + - {os: windows-2019, FC: intel-classic, FC_V: 2021.7, shell: pwsh} defaults: run: - shell: bash + shell: ${{ matrix.shell }} steps: - name: Checkout repo @@ -171,6 +170,12 @@ jobs: run: | pixi run autotest-schedule + - name: Upload failed test output + if: failure() + run: | + pwd + ls -h autotest/ + - name: Upload failed test output if: failure() uses: actions/upload-artifact@v4 diff --git a/autotest/test_cli_cmds.py b/autotest/test_cli_cmds.py index 4e63589..4abf647 100644 --- a/autotest/test_cli_cmds.py +++ b/autotest/test_cli_cmds.py @@ -81,7 +81,7 @@ def test_make_program_all(module_tmpdir) -> None: "make-program", ":", "--appdir", - str(module_tmpdir / "all"), + str(module_tmpdir), "--verbose", ] run_cli_cmd(cmd) diff --git a/pixi.toml b/pixi.toml index 9b13c7a..a306d7f 100644 --- a/pixi.toml +++ b/pixi.toml @@ -52,4 +52,7 @@ coverage-report = { cmd = "coverage report", cwd = "autotest"} # release update-version = { cmd = "python scripts/update_version.py -v"} -create-codejson = { cmd = "make-code-json" } \ No newline at end of file +create-codejson = { cmd = "make-code-json" } + +[target.win-64.tasks] +autotest-schedule = { cmd = "pytest -v -m='schedule' --durations=0 --cov=pymake --cov-report=xml --basetemp=$RUNNER_TEMP/pytest_temp --keep-failed .failed", cwd = "autotest" } From b9751f0580829b5760db1e9bad9d772f246a4430 Mon Sep 17 00:00:00 2001 From: Joseph D Hughes Date: Tue, 18 Jun 2024 11:28:08 -0500 Subject: [PATCH 2/6] * temp change --- .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 601ef5a..3413d49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -166,15 +166,15 @@ jobs: if: runner.os == 'Windows' run: choco install make - - name: Run scheduled tests - run: | - pixi run autotest-schedule - - - name: Upload failed test output - if: failure() + - name: Print current directory run: | pwd + ls -h . ls -h autotest/ + + - name: Run scheduled tests + run: | + pixi run autotest-schedule - name: Upload failed test output if: failure() From f1b7a8b58ad1e16b69e6613b8478362b40bbdf87 Mon Sep 17 00:00:00 2001 From: Joseph D Hughes Date: Tue, 18 Jun 2024 11:50:57 -0500 Subject: [PATCH 3/6] * update pixi schedule task for windows --- pixi.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index a306d7f..050f277 100644 --- a/pixi.toml +++ b/pixi.toml @@ -55,4 +55,4 @@ update-version = { cmd = "python scripts/update_version.py -v"} create-codejson = { cmd = "make-code-json" } [target.win-64.tasks] -autotest-schedule = { cmd = "pytest -v -m='schedule' --durations=0 --cov=pymake --cov-report=xml --basetemp=$RUNNER_TEMP/pytest_temp --keep-failed .failed", cwd = "autotest" } +autotest-schedule = { cmd = "pytest -v -m='schedule' --durations=0 --cov=pymake --cov-report=xml --basetemp=$(pwd)/temp --keep-failed .failed", cwd = "autotest" } From b3da2dc00e48a43d2afa599ee0ce7c1a69947fad Mon Sep 17 00:00:00 2001 From: Joseph D Hughes Date: Tue, 18 Jun 2024 13:56:56 -0500 Subject: [PATCH 4/6] * update --- .github/workflows/ci.yml | 8 +------- autotest/test_cli_cmds.py | 6 +++--- pixi.toml | 3 --- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3413d49..08c7872 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -166,12 +166,6 @@ jobs: if: runner.os == 'Windows' run: choco install make - - name: Print current directory - run: | - pwd - ls -h . - ls -h autotest/ - - name: Run scheduled tests run: | pixi run autotest-schedule @@ -181,7 +175,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: failed-schedule-${{ matrix.os }}-${{ matrix.FC }}-${{ matrix.FC_V }} - path: ./autotest/.failed + path: autotest/.failed - name: Print coverage report before upload run: | diff --git a/autotest/test_cli_cmds.py b/autotest/test_cli_cmds.py index 4abf647..6465f5d 100644 --- a/autotest/test_cli_cmds.py +++ b/autotest/test_cli_cmds.py @@ -51,7 +51,7 @@ def test_make_program(function_tmpdir, target: str) -> None: "make-program", target, "--appdir", - str(function_tmpdir), + ".", "--verbose", ] run_cli_cmd(cmd) @@ -68,7 +68,7 @@ def test_make_program_double(function_tmpdir) -> None: "--double", "--verbose", "--appdir", - str(function_tmpdir), + ".", ] run_cli_cmd(cmd) @@ -81,7 +81,7 @@ def test_make_program_all(module_tmpdir) -> None: "make-program", ":", "--appdir", - str(module_tmpdir), + ".", "--verbose", ] run_cli_cmd(cmd) diff --git a/pixi.toml b/pixi.toml index 050f277..d6f43bf 100644 --- a/pixi.toml +++ b/pixi.toml @@ -53,6 +53,3 @@ coverage-report = { cmd = "coverage report", cwd = "autotest"} # release update-version = { cmd = "python scripts/update_version.py -v"} create-codejson = { cmd = "make-code-json" } - -[target.win-64.tasks] -autotest-schedule = { cmd = "pytest -v -m='schedule' --durations=0 --cov=pymake --cov-report=xml --basetemp=$(pwd)/temp --keep-failed .failed", cwd = "autotest" } From 11fe03b82c73980cdade81c1e51d2999d04af342 Mon Sep 17 00:00:00 2001 From: Joseph D Hughes Date: Tue, 18 Jun 2024 14:41:01 -0500 Subject: [PATCH 5/6] * update --- .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 08c7872..61f7404 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,7 +123,7 @@ jobs: # test latest gcc and python - {os: ubuntu-latest, FC: gcc, FC_V: 13, shell: bash} - {os: macos-latest, FC: gcc, FC_V: 13, shell: bash} - - {os: windows-2019, FC: gcc, FC_V: 13, shell: pwsh} + - {os: windows-latest, FC: gcc, FC_V: 13, shell: pwsh} # test latest python and intel - {os: ubuntu-latest, FC: intel-classic, FC_V: 2021.7, shell: bash} - {os: macos-13, FC: intel-classic, FC_V: 2021.7, shell: bash} From 21f1fb99cdd053feaadafc4603ae999692bb92da Mon Sep 17 00:00:00 2001 From: Joseph D Hughes Date: Tue, 18 Jun 2024 16:20:55 -0500 Subject: [PATCH 6/6] * restore skipping pymake-schedule except for scheduled jobs --- .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 61f7404..70c4869 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,7 +114,7 @@ jobs: pymake-schedule: name: pymake scheduled - # if: ${{ github.event_name == 'schedule' }} + if: ${{ github.event_name == 'schedule' }} runs-on: ${{ matrix.os }} strategy: fail-fast: false