diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 94ae6e86..4d75e1f0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -4,7 +4,7 @@ jobs: tests: strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, windows-latest] gcc_v: [11] node-version: [18.x] fail-fast: false @@ -33,6 +33,16 @@ jobs: --slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_V} \ --slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V} + - name: Install GCC compilers Windows + if: contains(matrix.os, 'windows') + run: | + Invoke-WebRequest -Uri $Env:GCC_DOWNLOAD -OutFile mingw-w64.zip + Expand-Archive mingw-w64.zip + echo "$pwd\mingw-w64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + env: + GCC_DOWNLOAD: | + https://github.com/brechtsanders/winlibs_mingw/releases/download/13.0.1-snapshot20230122-10.0.0-msvcrt-r1/winlibs-i686-posix-dwarf-gcc-13.0.1-snapshot20230122-mingw-w64msvcrt-10.0.0-r1.zip + - name: Installing Extension run: npm ci - name: Compile @@ -42,12 +52,12 @@ jobs: - name: Test Syntax Highlighting run: npm run test:grammar - name: Test Unittests - uses: GabrielBB/xvfb-action@v1 + uses: GabrielBB/xvfb-action@v1.6 with: run: npm run test # This will not fail the job if tests fail so we have to npm test separately - name: Coverage report - uses: GabrielBB/xvfb-action@v1 + uses: GabrielBB/xvfb-action@v1.6 with: run: npm run coverage - name: Upload coverage to Codecov diff --git a/CHANGELOG.md b/CHANGELOG.md index fd97c284..41861d76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed +- Changed the way Python is invoked in Windows machines uses `py` instead of `python` - Changed the `npm vsce` package to `@vscode/vsce` for publishing ([#814](https://github.com/fortran-lang/vscode-fortran-support/issues/814)) - Changed logger to draw focus on certain error messages diff --git a/src/lib/tools.ts b/src/lib/tools.ts index 20c31fa6..38c20834 100644 --- a/src/lib/tools.ts +++ b/src/lib/tools.ts @@ -142,7 +142,10 @@ export async function promptForMissingTool( * @param pyPackage name of python package in PyPi */ export async function pipInstall(pyPackage: string): Promise { - const py = 'python3'; // Fetches the top-most python in the Shell + // Fetches the top-most python in the Shell + // For Windows, use py instead of python3, see: + // https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-from-pypi + const py = process.platform === 'win32' ? 'py' : 'python3'; const args = ['-m', 'pip', 'install', '--user', '--upgrade', pyPackage]; return await shellTask(py, args, `pip: ${pyPackage}`); } diff --git a/test/fortran/.vscode/settings.json b/test/fortran/.vscode/settings.json index eaeedcc4..64f99b73 100644 --- a/test/fortran/.vscode/settings.json +++ b/test/fortran/.vscode/settings.json @@ -20,5 +20,7 @@ "fortran.fortls.excludeSuffixes": [".snap"], "fortran.fortls.excludeDirectories": [".vscode/"], "fortran.fortls.notifyInit": true, - "fortran.linter.compiler": "gfortran" + "fortran.linter.compiler": "gfortran", + // Supress Git pop-up interfering with UI testing + "git.openRepositoryInParentFolders": "always" } diff --git a/test/fortran/fypp/.vscode/settings.json b/test/fortran/fypp/.vscode/settings.json new file mode 100644 index 00000000..1ff6b43c --- /dev/null +++ b/test/fortran/fypp/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "fortran.linter.fypp.enabled": true, + // Supress Git pop-up interfering with UI testing + "git.openRepositoryInParentFolders": "always" +} diff --git a/test/fortran/lint/.vscode/settings.json b/test/fortran/lint/.vscode/settings.json new file mode 100644 index 00000000..431b43bf --- /dev/null +++ b/test/fortran/lint/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "fortran.fortls.preprocessor.definitions": { + "REALTYPEWIDTH": "64", + "IDXTYPEWIDTH": "64" + }, + "fortran.linter.extraArgs": ["-DIDXTYPEWIDTH=64", "-DREALTYPEWIDTH=64"], + "fortran.logging.level": "Debug", + // Supress Git pop-up interfering with UI testing + "git.openRepositoryInParentFolders": "always" +}