Skip to content

Commit

Permalink
Windows-specific tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zgrannan committed Nov 30, 2023
1 parent 560994a commit 1cb6fb8
Showing 1 changed file with 32 additions and 13 deletions.
45 changes: 32 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,6 @@ jobs:
with:
java-version: '15'
distribution: 'zulu'
- name: Set COMPILATION_TARGET_PRUSTI for Windows
if: matrix.os == 'windows-latest'
run: |
[System.Environment]::SetEnvironmentVariable("COMPILATION_TARGET_PRUSTI", "x86_64-pc-windows-msvc", [System.EnvironmentVariableTarget]::Process)
echo "COMPILATION_TARGET_PRUSTI is now set to $env:COMPILATION_TARGET_PRUSTI"
- name: Echo COMPILATION_TARGET_PRUSTI
run: echo "COMPILATION_TARGET_PRUSTI is set to $COMPILATION_TARGET_PRUSTI"
- name: Set up the environment
run: python x.py setup
- name: Cache cargo
Expand All @@ -257,13 +250,39 @@ jobs:
key: ${{ env.VER_CACHE_KEY_UNIQUE }}
# Restore from the most recent cache that matches a shared prefix of the key
restore-keys: ${{ env.VER_CACHE_KEY_SHARED }}
- name: Build with cargo
run: python x.py build --all --jobs 1 ${{ matrix.os == 'windows-latest' && '--target x86_64-pc-windows-msvc' || '' }}
- name: Run cargo tests
run: python x.py test --all ${{ matrix.os == 'windows-latest' && '--target x86_64-pc-windows-msvc' || '' }}
- name: Run a subset of tests with Carbon
- name: Build with cargo (Windows)
if: matrix.os == 'windows-latest'
run: python x.py build --all --jobs 1 --target x86_64-pc-windows-msvc
shell: powershell

- name: Build with cargo (Non-Windows)
if: matrix.os != 'windows-latest'
run: python x.py build --all --jobs 1

- name: Run cargo tests (Windows)
if: matrix.os == 'windows-latest'
run: |
$env:COMPILATION_TARGET_PRUSTI="x86_64-pc-windows-msvc"
python x.py test --all --target x86_64-pc-windows-msvc
shell: powershell

- name: Run cargo tests (Non-Windows)
if: matrix.os != 'windows-latest'
run: python x.py test --all

- name: Run a subset of tests with Carbon (Windows)
if: matrix.os == 'windows-latest'
run: |
$env:COMPILATION_TARGET_PRUSTI="x86_64-pc-windows-msvc"
python x.py test pass/no-annotation --all --verbose --target x86_64-pc-windows-msvc
shell: powershell
env:
PRUSTI_VIPER_BACKEND: carbon

- name: Run a subset of tests with Carbon (Non-Windows)
if: matrix.os != 'windows-latest'
run: |
python x.py test pass/no-annotation --all --verbose ${{ matrix.os == 'windows-latest' && '--target x86_64-pc-windows-msvc' || '' }}
python x.py test pass/no-annotation --all --verbose
env:
PRUSTI_VIPER_BACKEND: carbon
- name: Check prusti-contracts
Expand Down

0 comments on commit 1cb6fb8

Please sign in to comment.