Skip to content

Commit

Permalink
[#132] Base py3 migration. (#676)
Browse files Browse the repository at this point in the history
* Try testing on CentOS 5 under Docker.

* Replaced tabs with 4 spaces.

* Updated module versions in pavement.py to match server master.

* Try fixing python-info-action.

* Test on CentOS 6.10 under Docker too.

* Try fixing old CentOS woes.

* Fixed CentOS 6.10 vault repo address.

* Do not use actions/cache on CentOS 6.10.

* Also test on Ubuntu Server 14.04/16.04 under Docker.

* Also test on macOS 11.

* macos-11 not available for us yet.

* Update for centos-5 passwd file.

* Update release version.

* Iniatil deps and lint.

* Move to non namespace package.

* Move to @Implementer.

* Move test code to chevah_compat and remove six and future.

* use distro instead of ld. remove  skippy3

* Slow test update.

* Update normal tests.

* Update elevated tests.

* Fix more tests.

* fix ci test run.

* Use newer python3.

* Try to define pam and arpy deps only on Linux. Mac and AIX will not have pam support.

* Use latest python_pam

* Update requirements.

* Try to debug centos 8.2 pam.

* Try to fix pywin32 on windowd.

* Run CI on windows with bash.

* Use pythia.

* Use pythia.

* update deps.

* Merge master.

* fix lint.

* Better unicode/binary handling for the test file.

* 1.0.4 fix md5 sum.

* 1.0.5 add skipOnPy3.

* 1.0.6 First win fixes for py3.

* 1.0.7 Win filesytem fixes.

* Cleanup md5 not used.

* Fix  tests after merge.

* Update after merge with master.

* Remove pywin32 post install.

* Try to debug windows failed ci.

* More updates after windows run.

* more ci fixes.

* Update for 1.0.8.

* Don't show password in the error. This is just dev code, but still.

* Update docker tests. Fix linux tests. Enable win debug.

* More win fixes.

* more win fixes.

* Update after review.

---------

Co-authored-by: dumol <dumol@gnome.org>
  • Loading branch information
adiroiban and dumol authored Jul 4, 2023
1 parent ffeb6f6 commit 22902d9
Show file tree
Hide file tree
Showing 61 changed files with 1,473 additions and 1,870 deletions.
88 changes: 54 additions & 34 deletions .github/workflows/bare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

env:
TMATE_DEBUG: 'no'
Expand All @@ -45,24 +48,24 @@ jobs:
uses: actions/cache@v3
with:
path: |
build-compat
key: ${{ runner.os }}-${{ hashFiles('pavement.py') }}-${{ hashFiles('brink.conf') }}-unicode
build-py3
key: ${{ runner.os }}-${{ hashFiles('pavement.py') }}-${{ hashFiles('pythia.conf') }}-unicode

- name: Deps
run: ./brink.sh deps
run: ./pythia.sh deps

- uses: chevah/python-info-action@v1
with:
python-path: build-compat/bin/python
python-path: build-py3/bin/python

- name: Move build to Unicode path
run: mv build-compat build-compat
run: mv build-py3 build-py3

- name: Test
run: |
./brink.sh test_ci2
./pythia.sh test_ci2
env:
CHEVAH_BUILD: build-compat
CHEVAH_BUILD: build-py3

- name: Tmate debug on failure
if: failure() && env.TMATE_DEBUG == 'yes'
Expand All @@ -71,7 +74,7 @@ jobs:
limit-access-to-actor: true

- name: Move build back to to ascii
run: mv build-compat-ț build-compat
run: mv build-py3-ț build-py


ubuntu-2204-ascii-path:
Expand All @@ -93,14 +96,14 @@ jobs:
uses: actions/cache@v3
with:
path: |
build-compat
key: ${{ runner.os }}-${{ hashFiles('pavement.py') }}-${{ hashFiles('brink.conf') }}-ascii
build-py3
key: ${{ runner.os }}-${{ hashFiles('pavement.py') }}-${{ hashFiles('pythia.conf') }}-ascii

- name: Deps
run: ./brink.sh deps
run: ./pythia.sh deps

- name: Test
run: ./brink.sh test_ci2
run: ./pythia.sh test_ci2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -111,7 +114,7 @@ jobs:
limit-access-to-actor: true

- name: Publish cov
run: ./brink.sh codecov_publish
run: ./pythia.sh codecov_publish
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -130,19 +133,19 @@ jobs:
uses: actions/cache@v3
with:
path: |
build-compat
key: ${{ runner.os }}-${{ hashFiles('pavement.py') }}-${{ hashFiles('brink.conf') }}-unicode
build-py3
key: ${{ runner.os }}-${{ hashFiles('pavement.py') }}-${{ hashFiles('pythia.conf') }}-unicode

- name: Deps
run: ./brink.sh deps
run: ./pythia.sh deps

- name: Move build to Unicode path
run: mv build-compat build-compat
run: mv build-py3 build-py3

- name: Test
run: ./brink.sh test_ci2
run: ./pythia.sh test_ci2
env:
CHEVAH_BUILD: build-compat
CHEVAH_BUILD: build-py3
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Tmate debug on failure
Expand All @@ -152,10 +155,10 @@ jobs:
limit-access-to-actor: true

- name: Move build back to to ascii
run: mv build-compat-ț build-compat
run: mv build-py3-ț build-py3

- name: Publish cov
run: ./brink.sh codecov_publish
run: ./pythia.sh codecov_publish
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -174,14 +177,16 @@ jobs:
uses: actions/cache@v3
with:
path: |
build-compat
key: ${{ runner.os }}-${{ hashFiles('pavement.py') }}-${{ hashFiles('brink.conf') }}-ascii
build-py3
key: ${{ runner.os }}-${{ hashFiles('pavement.py') }}-${{ hashFiles('pythia.conf') }}-ascii

- name: Deps
run: ./brink.sh deps
run: |
./pythia.sh deps
./pythia.sh build
- name: Test
run: ./brink.sh test_ci2
run: ./pythia.sh test_ci2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -192,7 +197,7 @@ jobs:
limit-access-to-actor: true

- name: Publish cov
run: ./brink.sh codecov_publish
run: ./pythia.sh codecov_publish
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -208,26 +213,41 @@ jobs:
uses: actions/cache@v3
with:
path: |
build-compat
key: ${{ runner.os }}-${{ hashFiles('pavement.py') }}-${{ hashFiles('brink.conf') }}
build-py3
key: ${{ runner.os }}-${{ hashFiles('pavement.py') }}-${{ hashFiles('pythia.conf') }}

- name: Deps
run: sh ./brink.sh deps
run: |
./pythia.sh deps
./pythia.sh build
# FIXME:691:
# We should have just a single test step here to run all the tests in one
# go.
# Not sure why on Windows the normal tests are not discovered by default.
- name: Test normal
run: |
./pythia.sh test normal
env:
CODECOV_TOKEN: enabled
USER: runneradmin

- name: Test
run: sh ./brink.sh test_ci2
- name: Test elevated
run: |
./pythia.sh test elevated
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_TOKEN: enabled
USER: runneradmin

- name: Tmate debug on failure
if: failure() && env.TMATE_DEBUG == 'yes'
if: failure() && env.TMATE_DEBUG == 'no'
uses: chevah/action-tmate@v3
with:
limit-access-to-actor: true

- name: Public coverage
if: ${{ !cancelled() }}
run: sh ./brink.sh codecov_publish
run: ./pythia.sh codecov_publish
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand Down
42 changes: 7 additions & 35 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,11 @@ jobs:
fail-fast: false
matrix:
container:
- alpine:3.14
- amazonlinux:2018.03
- alpine:3.18
- amazonlinux:2
- amazonlinux:2022
# CentOS 5.11 setup was saved as an image pushed to Docker Hub. See
# the Overview section at https://hub.docker.com/r/proatria/centos.
- proatria/centos:5.11-chevah1
- centos:6.10
- centos:7
- centos:8.2.2004
- centos-stream9-fips
- oraclelinux:8
- ubuntu:14.04
- ubuntu:16.04
Expand All @@ -66,21 +61,6 @@ jobs:
apk upgrade -U
apk add git bash shadow sudo curl
- name: CentOS 6.10 setup
if: matrix.container == 'centos:6.10'
run: |
sed -i s/^mirrorlist=/#mirrorlist=/ /etc/yum.repos.d/*.repo
sed -i s@^#baseurl=http://mirror.centos.org/centos/\$releasever/@baseurl=http://vault.centos.org/6.10/@ /etc/yum.repos.d/*.repo
yum -y upgrade
# OpenSSL got updated in 8.3 from 1.1.1c to 1.1.1g.
- name: CentOS 8.2 setup
if: matrix.container == 'centos:8.2.2004'
run: |
sed -i s/^mirrorlist=/#mirrorlist=/ /etc/yum.repos.d/*.repo
sed -i s@^#baseurl=http://mirror.centos.org/\$contentdir/\$releasever/@baseurl=https://vault.centos.org/8.2.2004/@ /etc/yum.repos.d/*.repo
yum -y upgrade
- name: Amazon Linux 2022 setup
if: matrix.container == 'amazonlinux:2022'
run: yum -y install libxcrypt-compat
Expand Down Expand Up @@ -121,42 +101,34 @@ jobs:
git reset --hard ${{ github.event.after }}
git log -1 --format='%H'
# The old curl on CentOS 5 has cert check issues with GitHub's SNI.
# Also with Let's Encrypt certificates, lately.
# So download the runtime over HTTP from backup server.
- name: CentOS 5 BINARY_DIST_URI hack
if: startsWith(matrix.container, 'proatria/centos:5.11')
run: |
sed -i s@^#BINARY_DIST_URI=\'https://bin.chevah.com:20443/production\'@BINARY_DIST_URI=\'http://bin.chevah.com:20080/production\'@ /home/chevah/$CHEVAH_REPO/brink.conf
# This action also fails on CentOS 5/6.
- name: Cache build
uses: actions/cache@v3
if: matrix.container != 'proatria/centos:5.11-chevah1' && matrix.container != 'centos:6.10'
with:
path: |
/home/chevah/$CHEVAH_REPO/build-$CHEVAH_REPO
key: ${{ runner.os }}-${{ hashFiles('pavement.py') }}-${{ hashFiles('brink.conf') }}-${{ matrix.container }}
key: ${{ runner.os }}-${{ hashFiles('pavement.py') }}-${{ hashFiles('pythia.conf') }}-${{ matrix.container }}

- name: Deps
run: |
cd /home/chevah/$CHEVAH_REPO
./brink.sh deps
./pythia.sh deps
chown -R chevah .
- uses: chevah/python-info-action@v1
with:
python-path: /home/chevah/$CHEVAH_REPO/build-$CHEVAH_REPO/bin/python
python-path: /home/chevah/$CHEVAH_REPO/build-py3/bin/python

- name: Build
run: |
cd /home/chevah/$CHEVAH_REPO
su chevah -c "./brink.sh build"
su chevah -c "./pythia.sh build"
- name: Test
run: |
cd /home/chevah/$CHEVAH_REPO
su chevah -c "./brink.sh test_ci2"
su chevah -c "./pythia.sh test_ci2"
# Helper so that on GitHub repo settings we can configure a single job as
# required.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- uses: actions/checkout@v3
- name: Deps
run: ./brink.sh deps
run: ./pythia.sh deps

- name: Lint
run: ./brink.sh lint --all
run: ./pythia.sh lint --all
7 changes: 0 additions & 7 deletions chevah/__init__.py

This file was deleted.

Loading

0 comments on commit 22902d9

Please sign in to comment.