Skip to content

Commit

Permalink
ci(github): add Mac and Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dbohdan committed May 25, 2024
1 parent 928e850 commit 2b71d91
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,26 @@ jobs:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies

- name: Install dependencies using Homebrew
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install expect
- name: Install dependencies using APT
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get install -y expect
sudo apt-get install -y expect
- name: Set up just
uses: extractions/setup-just@v2

- name: Run tests
run: |
just test
9 changes: 9 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,29 @@ default: test
debug:
cargo build

[unix]
release: release-linux release-windows

[unix]
release-linux:
cargo build --release --target x86_64-unknown-linux-musl
cp target/x86_64-unknown-linux-musl/release/jsonwatch jsonwatch-linux-x86_64
strip jsonwatch-linux-x86_64

[unix]
release-windows:
cargo build --release --target i686-pc-windows-gnu
cp target/i686-pc-windows-gnu/release/jsonwatch.exe jsonwatch-win32.exe
strip jsonwatch-win32.exe

[unix]
test: debug test-unit test-integration

[windows]
test: debug test-unit

# The integration tests use Expect and do not work on Windows.
[unix]
test-integration:
{{ TCLSH }} tests/integration.tcl

Expand Down

0 comments on commit 2b71d91

Please sign in to comment.