Skip to content

Commit

Permalink
add virtual serial port names to environment variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
berkowski committed Jul 19, 2021
1 parent e31f101 commit 536ee09
Showing 1 changed file with 77 additions and 16 deletions.
93 changes: 77 additions & 16 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ on:
schedule:
- cron: '0 8 15 * *'
jobs:
ci:
runs-on: ${{ matrix.os }}
ci-linux:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
# - beta
# - nightly
os:
# - macos-latest
# - ubuntu-latest
- windows-latest
env:
TEST_PORT_A: /tmp/ttyS10
TEST_PORT_B: /tmp/ttyS11
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand All @@ -26,36 +25,98 @@ jobs:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- name: install socat
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install socat -y
socat -V
- name: cargo test
run: cargo test -j1 -- --test-threads=1
env:
TEST_PORT_NAMES: ${{ env.TEST_PORT_A }};${{ env.TEST_PORT_B }}
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: check format
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
ci-macOS:
runs-on: macos-latest
strategy:
matrix:
rust:
- stable
# - beta
# - nightly
env:
TEST_PORT_A: /tmp/ttyS10
TEST_PORT_B: /tmp/ttyS11
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- name: install socat
if: ${{ runner.os == 'macOS' }}
run: |
brew install socat
socat -V
env:
HOMEBREW_NO_AUTO_UPDATE: 1
- name: cargo test
run: cargo test -j1 -- --test-threads=1
env:
TEST_PORT_NAMES: ${{ env.TEST_PORT_A }};${{ env.TEST_PORT_B }}
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: check format
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
ci-windows:
runs-on: windows-latest
strategy:
matrix:
rust:
- stable
# - beta
# - nightly
env:
TEST_PORT_A: COM10
TEST_PORT_B: COM11
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- uses: ilammy/msvc-dev-cmd@v1
if: ${{ runner.os == 'Windows' }}
- name: install com0com
if: ${{ runner.os == 'Windows' }}
run: |
CertMgr.exe /add com0com.cer /s /r localMachine root
CertMgr.exe /add com0com.cer /s /r localMachine trustedpublisher
.\setup_com0com_W7_x64_signed.exe /S
working-directory: .github
- name: setup com0com
if: ${{ runner.os == 'Windows' }}
run: .\setupc.exe install PortName=COM10,EmuBR=yes PortName=COM11,EmuBR=yes
run: .\setupc.exe install PortName=${{ env.TEST_PORT_A }},EmuBR=yes PortName=${{ env.TEST_PORT_B }},EmuBR=yes
working-directory: C:\Program Files (x86)\com0com
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: -j1 -- --test-threads=1
run: cargo test -j1 -- --test-threads=1
env:
TEST_PORT_NAMES: ${{ env.TEST_PORT_A }};${{ env.TEST_PORT_B }}
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
Expand Down

0 comments on commit 536ee09

Please sign in to comment.