Skip to content
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

Move from Travis to GitHub Actions #194

Merged
merged 2 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build and Test

# Run this workflow whenever a PR is created or pushed to.
on:
pull_request:
types: [opened, synchronize]

jobs:
build:

runs-on: ubuntu-20.04 # See #245
strategy:
matrix:
python-version: ["3.7"]
fail-fast: False

steps:
- uses: actions/checkout@v3

# https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
- run: git fetch --prune --unshallow

# We use Python from deadsnakes/action because the Python from
# actions/setup-python links with RUNPATH which is not compatible
# with StaticX. See #224.
- name: Set up Python ${{ matrix.python-version }}
uses: deadsnakes/action@v3.0.1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
docker version

sudo apt-get update
sudo apt-get install -y busybox musl-tools scons

pip install wheel

- name: Build and install
run: |
python setup.py bdist_wheel
pip install dist/staticx-*-py3-none-manylinux1_x86_64.whl
staticx --version

- name: Run unit tests
run: |
pytest -v

- name: Run integration tests
run: |
test/run_all.sh

- name: Run integration tests (w/o compression)
run: |
STATICX_FLAGS='--no-compress' test/run_all.sh

- name: Run integration tests (w/ strip)
run: |
STATICX_FLAGS='--strip' test/run_all.sh
10 changes: 8 additions & 2 deletions test/pyinstall-lib-runpath/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@

mydir = Path(__file__).parent

libfoo = CDLL(mydir / 'libfoo.so')
libbar = CDLL(mydir / 'libbar.so')
libfoo_path = (mydir / 'libfoo.so').absolute()
libbar_path = (mydir / 'libbar.so').absolute()

assert libfoo_path.exists()
assert libbar_path.exists()

libfoo = CDLL(libfoo_path)
libbar = CDLL(libbar_path)

def setup_prototype(func, restype, *argtypes):
func.restype = restype
Expand Down