Skip to content

Mix format charlists #93

Mix format charlists

Mix format charlists #93

Workflow file for this run

name: build
on: push
jobs:
test:
runs-on: ${{ matrix.os.runner }}
name: ${{ matrix.os.name }} / OTP ${{matrix.beam.otp}} / Elixir ${{matrix.beam.elixir}}
strategy:
matrix:
beam:
- { otp: '26', elixir: '1.15' }
- { otp: '25', elixir: '1.14' }
- { otp: '25', elixir: '1.13' }
- { otp: '24', elixir: '1.12' }
os:
- name: Linux
runner: ubuntu-latest
include:
- os: { name: Windows, runner: windows-latest }
beam: { otp: '26', elixir: '1.15' }
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.beam.otp }}
elixir-version: ${{ matrix.beam.elixir }}
- name: Retrieve tty0tty Cache
if: runner.os == 'Linux'
uses: actions/cache@v1
id: tty0tty-cache
with:
path: tty0tty
key: tty0tty
- name: Install tty0tty
if: runner.os == 'Linux' && steps.tty0tty-cache.outputs.cache-hit != 'true'
run: |
git clone https://github.com/colinleroy/tty0tty.git
- name: Set up tty0tty
if: runner.os == 'Linux'
run: |
cd tty0tty/module
make
sudo cp tty0tty.ko /lib/modules/$(uname -r)/kernel/drivers/misc/
sudo depmod
sudo modprobe tty0tty
sudo chmod 666 /dev/tnt*
- name: Retrieve com0com Cache
if: runner.os == 'Windows'
uses: actions/cache@v1
id: com0com-cache
with:
path: com0com
key: com0com
- name: Install com0com
if: runner.os == 'Windows' && steps.com0com-cache.outputs.cache-hit != 'true'
run: |
$Url = 'https://sourceforge.net/projects/signed-drivers/files/com0com/v3.0/com0com-3.0.0.0-i386-and-x64-signed.zip/download'
mkdir com0com | cd
curl --location $Url --output com0com.zip --silent
7z e com0com.zip amd64/* -r | Out-Null
$ExportType = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert
$cert = (Get-AuthenticodeSignature 'com0com.sys').SignerCertificate
Export-Certificate -Cert $cert -FilePath com0com.cer
- name: Set up com0com
if: runner.os == 'Windows'
run: |
cd com0com
Import-Certificate -FilePath com0com.cer -CertStoreLocation Cert:\LocalMachine\TrustedPublisher
./setupc.exe --silent install - -
- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v1
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Install Mix dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: mix deps.get
- name: mix test
if: runner.os == 'Windows'
run: |
$Env:CIRCUITS_UART_PORT1 = 'CNCA0'
$Env:CIRCUITS_UART_PORT2 = 'CNCB0'
mix test
- name: mix test
if: runner.os == 'Linux'
run: CIRCUITS_UART_PORT1=tnt0 CIRCUITS_UART_PORT2=tnt1 mix test
checks:
runs-on: ubuntu-latest
name: Extra checks
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: 26
elixir-version: 1.15
- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v1
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- run: mix deps.get
- run: mix compile
- run: mix docs
- run: mix format --check-formatted
- run: mix deps.unlock --check-unused
- run: mix hex.build
- run: mix credo -a
- run: mix dialyzer