|
| 1 | +# SPDX-FileCopyrightText: None |
| 2 | +# SPDX-License-Identifier: CC0-1.0 |
| 3 | +name: Windows builds |
| 4 | +on: push |
| 5 | + |
| 6 | +jobs: |
| 7 | + test: |
| 8 | + runs-on: ${{ matrix.os.runner }} |
| 9 | + name: ${{ matrix.os.name }} / OTP ${{ matrix.beam.otp }} / Elixir ${{ matrix.beam.elixir }} |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + beam: |
| 13 | + - { otp: '28', elixir: '1.19' } |
| 14 | + os: |
| 15 | + - name: Windows 2025 |
| 16 | + runner: blacksmith-2vcpu-windows-2025 |
| 17 | + env: |
| 18 | + ImageOS: win25 |
| 19 | + env: ${{ matrix.os.env }} |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v4 |
| 22 | + |
| 23 | + - uses: erlef/setup-beam@566deebc640988a494af16ecdf6f820fe0d3fea4 |
| 24 | + with: |
| 25 | + otp-version: ${{ matrix.beam.otp }} |
| 26 | + elixir-version: ${{ matrix.beam.elixir }} |
| 27 | + |
| 28 | + - name: Retrieve com0com Cache |
| 29 | + uses: actions/cache@v3 |
| 30 | + id: com0com-cache |
| 31 | + with: |
| 32 | + path: com0com |
| 33 | + key: com0com |
| 34 | + |
| 35 | + - name: Install com0com |
| 36 | + if: steps.com0com-cache.outputs.cache-hit != 'true' |
| 37 | + run: | |
| 38 | + $Url = 'https://sourceforge.net/projects/signed-drivers/files/com0com/v3.0/com0com-3.0.0.0-i386-and-x64-signed.zip/download' |
| 39 | +
|
| 40 | + mkdir com0com | cd |
| 41 | +
|
| 42 | + curl --location $Url --output com0com.zip --silent |
| 43 | + 7z e com0com.zip amd64/* -r | Out-Null |
| 44 | +
|
| 45 | + $ExportType = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert |
| 46 | + $cert = (Get-AuthenticodeSignature 'com0com.sys').SignerCertificate |
| 47 | + Export-Certificate -Cert $cert -FilePath com0com.cer |
| 48 | +
|
| 49 | + - name: Set up com0com |
| 50 | + run: | |
| 51 | + cd com0com |
| 52 | + Import-Certificate -FilePath com0com.cer -CertStoreLocation Cert:\LocalMachine\TrustedPublisher |
| 53 | + ./setupc.exe --silent install - - |
| 54 | +
|
| 55 | + - name: Install Mix dependencies |
| 56 | + run: mix deps.get |
| 57 | + |
| 58 | + - name: mix test |
| 59 | + run: | |
| 60 | + $Env:CIRCUITS_UART_PORT1 = 'CNCA0' |
| 61 | + $Env:CIRCUITS_UART_PORT2 = 'CNCB0' |
| 62 | + mix test |
0 commit comments