Skip to content

Commit

Permalink
Update to newer SDK, newer actions. (#21)
Browse files Browse the repository at this point in the history
Also require an older version of Python to make the test-server work.
  • Loading branch information
floitsch authored Nov 9, 2023
1 parent e5a1af6 commit 4b816be
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup constants
shell: bash
run: |
TOIT_VERSION=v2.0.0-alpha.12
TOIT_VERSION=v2.0.0-alpha.118
echo "TOIT_VERSION=$TOIT_VERSION" >> $GITHUB_ENV
export DOWNLOAD_DIR="${{ github.workspace }}/downloads"
echo "DOWNLOAD_DIR=$DOWNLOAD_DIR" >> $GITHUB_ENV
Expand Down Expand Up @@ -67,14 +67,14 @@ jobs:
- name: Use new Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: '3.11'
architecture: x64

- name: Fetch Python dependencies
run: |
pip install -r tests/requirements.txt
- uses: suisei-cn/actions-download-file@v1
- uses: suisei-cn/actions-download-file@v1.4.0
name: Download Toit
with:
url: ${{ env.TOIT_URL }}
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
# Zero-Clause BSD License

# Copyright (C) 2023 Toitware ApS.

# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.

# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

name: Publish package
on:
push:
tags:
- 'v*'
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-*'
jobs:
create-release:
name: Create new release
runs-on: ubuntu-latest
steps:
- name: Publish
uses: toitlang/pkg-publish@v1.0.2
uses: toitlang/pkg-publish@v1.4.0
6 changes: 4 additions & 2 deletions package.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
sdk: ^2.0.0-alpha.118
prefixes:
rs485: toit-rs485
packages:
toit-rs485:
url: github.com/toitware/toit-rs485
version: 1.0.1
hash: 854d96a9d27b6ce7325a9698001087b292f4b4b5
name: rs485
version: 1.2.0
hash: 8e38736d19dab1d9275568df269f982e6118acec
6 changes: 5 additions & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: modbus
description: A Modbus Toit client.
environment:
sdk: ^2.0.0-alpha.118
dependencies:
rs485:
url: github.com/toitware/toit-rs485
version: ^1.0.1
version: ^1.2.0
2 changes: 2 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The safe choice is to consider them BSD as well.

## Installation

pymodbus=3.0.0.dev4 requires the 'imp' module, which was removed with Python 3.12.

Install with

``` shell
Expand Down
12 changes: 7 additions & 5 deletions tests/package.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sdk: ^1.6.10
sdk: ^2.0.0-alpha.64
prefixes:
host: pkg-host
modbus: ..
Expand All @@ -9,9 +9,11 @@ packages:
rs485: toit-rs485
pkg-host:
url: github.com/toitlang/pkg-host
version: 1.6.0
hash: d05b91390e76c3543a9968b042aed330210bafa4
name: host
version: 1.11.0
hash: 7e7df6ac70d98a02f232185add81a06cec0d77e8
toit-rs485:
url: github.com/toitware/toit-rs485
version: 1.0.1
hash: 854d96a9d27b6ce7325a9698001087b292f4b4b5
name: rs485
version: 1.2.0
hash: 8e38736d19dab1d9275568df269f982e6118acec
2 changes: 1 addition & 1 deletion tests/package.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
host:
url: github.com/toitlang/pkg-host
version: ^1.6.0
version: ^1.11.0
modbus:
path: ..

0 comments on commit 4b816be

Please sign in to comment.