-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI for BSD #167
Draft
Youw
wants to merge
33
commits into
trezor:master
Choose a base branch
from
Youw:ci-cross-platform
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
CI for BSD #167
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
c24e788
Try FreeBSD VM Action
Youw ce54745
one more attempt
Youw c5b5656
fix pip package name
Youw cf3e66c
fix python/pip package name
Youw a053b43
a bug in the job?
Youw 82b9daa
a bug in the job?
Youw 425c12d
install system HIDAPI on demand
Youw 4941287
try more BSD platforms
Youw ebe6e26
rework
Youw 325cfe8
fix
Youw f453360
try cross-platform-actions
Youw 51e13e2
fix
Youw a45fa0e
fix
Youw 9843954
fix
Youw 2770524
fix
Youw 4b2202c
fix
Youw 73d3296
fix
Youw 2586cb1
fix
Youw b76be68
macos host one when it make sense
5809001
autotools build for hidapi
Youw 9611d18
add missing file
Youw c8ed698
fix
Youw 7a56c99
fix
Youw 14c60b8
fix
Youw b3a11c8
try
Youw 52b7676
try2
Youw 6025b02
try4
Youw fa2b39d
try4
Youw 80957fb
try5
Youw e189828
try5
Youw f99840d
last try
Youw 2010c8e
basta
Youw ea093c4
Merge branch 'trezor:master' into ci-cross-platform
Youw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: VM Python package | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
bsd: | ||
runs-on: ${{ matrix.platform.host }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- name: freebsd | ||
version: '13.2' | ||
host: macos-latest | ||
|
||
# Issues: | ||
# > pkg_add: no pkg found for 'autoconf', sorry. | ||
# > pkg_add: no pkg found for 'devel/autoconf', sorry. | ||
# | ||
#- name: netbsd | ||
# version: '9.3' | ||
# host: ubuntu-latest | ||
|
||
# Issues: | ||
# > bash: line 11: python: command not found | ||
# > configure: error: HIDAPI is not supported on your operating system yet | ||
#- name: openbsd | ||
# version: '7.4' | ||
# host: macos-latest | ||
|
||
system-hidapi: ["", "--with-system-hidapi"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Run in VM | ||
uses: cross-platform-actions/[email protected] | ||
env: | ||
HIDAPI_SYSTEM_HIDAPI: ${{ matrix.system-hidapi == '--with-system-hidapi' && '1' || '0' }} | ||
with: | ||
environment_variables: HIDAPI_SYSTEM_HIDAPI | ||
operating_system: ${{ matrix.platform.name }} | ||
version: ${{ matrix.platform.version }} | ||
shell: bash | ||
sync_files: runner-to-vm | ||
run: | | ||
set -e | ||
|
||
pwd && ls -l1 | ||
|
||
export PLATFORM_VERSION=${{ matrix.platform.version }} | ||
${{ matrix.platform.name == 'freebsd' && 'sudo pkg install -y autoconf automake libtool gmake libiconv pkgconf lang/python3 lang/python devel/py-pip' || '' }} | ||
${{ matrix.platform.name == 'netbsd' && 'export PATH=$PATH:/usr/sbin/; sudo pkg_add devel/autoconf devel/automake devel/libtool devel/gmake devel/pkgconf devel/libusb1 converters/libiconv devel/py-pip' || '' }} | ||
${{ matrix.platform.name == 'openbsd' && 'export AUTOCONF_VERSION=2.71; export AUTOMAKE_VERSION=1.15; sudo pkg_add autoconf-2.71 automake-1.15.1 libtool gmake pkgconf libusb1-- libiconv python3 py3-pip' || '' }} | ||
${{ matrix.system-hidapi == '--with-system-hidapi' && './build_install_hidapi_autotools.sh' || '' }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. have to use autotools build here due to bug in CMake build: libusb/hidapi#638 |
||
|
||
python -m pip install --upgrade pip | ||
python -m pip install setuptools tox tox-gh-actions | ||
pip install -r requirements.txt --upgrade | ||
|
||
pip install . | ||
python -m tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set +x | ||
|
||
rm -rf hidapi_build | ||
mkdir -p hidapi_build | ||
pushd hidapi_build | ||
cmake -GNinja -B . -S ../hidapi | ||
ninja | ||
sudo ninja install | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set +x | ||
|
||
pushd hidapi | ||
./bootstrap | ||
./configure | ||
make | ||
sudo make install | ||
popd |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe
/usr/pkg/bin
is missing in path forpython
to be found - haven't checked yetThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe need a symling for
python3.9
->python
- haven't checked either