Skip to content

Commit

Permalink
CI: Setup MSVC on Windows (lcompilers#18)
Browse files Browse the repository at this point in the history
Use cmd.exe to setup MSVC and then call xonsh.
  • Loading branch information
certik committed Jan 14, 2022
1 parent ce82896 commit 4fc00e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,19 @@ jobs:
- name: Setup Platform (Windows)
if: contains(matrix.os, 'windows')
shell: bash -l {0}
shell: cmd
run: |
echo "LFORTRAN_CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV
echo "WIN=1" >> $GITHUB_ENV
echo "MACOS=0" >> $GITHUB_ENV
set CONDA_INSTALL_LOCN=C:\\Miniconda
call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
call conda activate test
set LFORTRAN_CMAKE_GENERATOR=Ninja
set WIN=1
set MACOS=0
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
xonsh ci\build.xsh
- name: Build and test
shell: bash -l {0}
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
run: |
echo $CONDA_PREFIX
xonsh ci/build.xsh
1 change: 1 addition & 0 deletions ci/build.xsh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ $RAISE_SUBPROC_ERROR = True
trace on

echo "CONDA_PREFIX=$CONDA_PREFIX"
echo "PATH=$PATH"
llvm-config --components

# Generate the `version` file
Expand Down

0 comments on commit 4fc00e5

Please sign in to comment.