Skip to content

Commit

Permalink
Reduce vmactions verbosity (#114)
Browse files Browse the repository at this point in the history
* switch to vmactions shell

* cd to workspace

* Use gh envs

* Try fix permissions

* ignore tarball user/permissions on extract

* add missing pkg

* switch to nfs

* Revert "ignore tarball user/permissions on extract"

This reverts commit 3b94844.

* Revert "Try fix permissions"

This reverts commit bbb027b.

* Reapply "Try fix permissions"

This reverts commit eae678a.

* Reapply "ignore tarball user/permissions on extract"

This reverts commit 2f47390.

* use setenv

* Revert "use setenv"

This reverts commit 7124edf.

* use bash
  • Loading branch information
bjia56 authored Dec 12, 2024
1 parent 89237be commit 34a626f
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 60 deletions.
123 changes: 70 additions & 53 deletions .github/workflows/build_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -340,17 +340,25 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Build in VM
uses: vmactions/freebsd-vm@v1
- name: Start VM
uses: bjia56/freebsd-vm@nfs
with:
envs: 'RUN_TESTS DEBUG_CI VERBOSE_CI PORTABLE_PYTHON_BUILDSYSTEM_BRANCH'
usesh: true
sync: nfs
release: ${{ steps.parse_release.outputs.release }}
prepare: |
pkg install -y cmake bash wget patch git zip python3 autoconf automake libtool gettext bison pkgconf gmake gperf patchelf
run: |
export PLATFORM=freebsd${{ matrix.release }}
bash ./scripts/build_freebsd.sh x86_64 ${{ inputs.python_version }} ${{ matrix.distribution }}
pkg install -y cmake bash wget patch git zip python3 autoconf automake libtool gettext bison pkgconf gmake gperf patchelf texinfo
chsh -s /usr/local/bin/bash root
- name: Build in VM
shell: freebsd {0}
run: |
cd ${{ github.workspace }}
export RUN_TESTS="${{ env.RUN_TESTS }}"
export DEBUG_CI="${{ env.DEBUG_CI }}"
export VERBOSE_CI="${{ env.VERBOSE_CI }}"
export PORTABLE_PYTHON_BUILDSYSTEM_BRANCH="${{ env.PORTABLE_PYTHON_BUILDSYSTEM_BRANCH }}"
export PLATFORM="freebsd${{ matrix.release }}"
bash ./scripts/build_freebsd.sh x86_64 ${{ inputs.python_version }} ${{ matrix.distribution }}
- name: Interactive debugging
if: ${{ always() && inputs.debug_interactive }}
Expand Down Expand Up @@ -399,31 +407,31 @@ jobs:
name: python-freebsd${{ matrix.release }}-x86_64-${{ matrix.distribution }}-${{ inputs.python_version }}
path: ./python/

- name: Test in VM
uses: vmactions/freebsd-vm@v1
- name: Start VM
uses: bjia56/freebsd-vm@nfs
with:
envs: 'RUN_TESTS DEBUG_CI VERBOSE_CI PORTABLE_PYTHON_BUILDSYSTEM_BRANCH'
usesh: true
copyback: false
sync: nfs
release: ${{ steps.parse_release.outputs.release }}
prepare: |
pkg install -y bash
run: |
cat > /tmp/test.sh <<EOF
unzip python/python-${{ matrix.distribution }}-${{ inputs.python_version }}-freebsd${{ matrix.release }}-x86_64.zip
chsh -s /usr/local/bin/bash root
cd python-${{ matrix.distribution }}-${{ inputs.python_version }}-freebsd${{ matrix.release }}-x86_64
chmod +x ./bin/python
./bin/python --version
./bin/python -m sysconfig
./bin/python ${{ github.workspace }}/scripts/test.py
./bin/pip3
- name: Test in VM
shell: freebsd {0}
run: |
cd ${{ github.workspace }}
unzip python/python-${{ matrix.distribution }}-${{ inputs.python_version }}-freebsd${{ matrix.release }}-x86_64.zip
if [[ "${{ inputs.run_tests }}" == "true" ]]; then
./bin/python -m test -v -ulargefile,network,decimal,cpu,subprocess,urlfetch,tzdata --timeout 60
fi
EOF
bash -e /tmp/test.sh
cd python-${{ matrix.distribution }}-${{ inputs.python_version }}-freebsd${{ matrix.release }}-x86_64
chmod +x ./bin/python
./bin/python --version
./bin/python -m sysconfig
./bin/python ${{ github.workspace }}/scripts/test.py
./bin/pip3
if [[ "${{ inputs.run_tests }}" == "true" ]]; then
./bin/python -m test -v -ulargefile,network,decimal,cpu,subprocess,urlfetch,tzdata --timeout 60
fi
build_solaris:
name: Solaris ${{ matrix.release }} ${{ inputs.python_version }} x86_64 ${{ matrix.distribution }} (build)
Expand All @@ -447,18 +455,25 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Build in VM
uses: vmactions/solaris-vm@v1
- name: Start VM
uses: bjia56/solaris-vm@nfs
with:
envs: 'RUN_TESTS DEBUG_CI VERBOSE_CI PORTABLE_PYTHON_BUILDSYSTEM_BRANCH'
usesh: true
sync: nfs
release: ${{ steps.parse_release.outputs.release }}
prepare: |
pkg install --accept cmake git autoconf automake libtool bison gperf gcc pkg-config python-39
ln -sf /usr/bin/python3.9 /usr/bin/python3
run: |
export PLATFORM=solaris${{ matrix.release }}
bash ./scripts/build_solaris.sh x86_64 ${{ inputs.python_version }} ${{ matrix.distribution }}
- name: Build in VM
shell: solaris {0}
run: |
cd ${{ github.workspace }}
export RUN_TESTS="${{ env.RUN_TESTS }}"
export DEBUG_CI="${{ env.DEBUG_CI }}"
export VERBOSE_CI="${{ env.VERBOSE_CI }}"
export PORTABLE_PYTHON_BUILDSYSTEM_BRANCH="${{ env.PORTABLE_PYTHON_BUILDSYSTEM_BRANCH }}"
export PLATFORM="solaris${{ matrix.release }}"
bash ./scripts/build_solaris.sh x86_64 ${{ inputs.python_version }} ${{ matrix.distribution }}
- name: Interactive debugging
if: ${{ always() && inputs.debug_interactive }}
Expand Down Expand Up @@ -505,29 +520,31 @@ jobs:
name: python-solaris${{ matrix.release }}-x86_64-${{ matrix.distribution }}-${{ inputs.python_version }}
path: ./python/

- name: Test in VM
uses: vmactions/solaris-vm@v1
- name: Start VM
uses: bjia56/solaris-vm@nfs
with:
envs: 'RUN_TESTS DEBUG_CI VERBOSE_CI PORTABLE_PYTHON_BUILDSYSTEM_BRANCH'
usesh: true
copyback: false
sync: nfs
release: ${{ steps.parse_release.outputs.release }}
run: |
cat > /tmp/test.sh <<EOF
unzip python/python-${{ matrix.distribution }}-${{ inputs.python_version }}-solaris${{ matrix.release }}-x86_64.zip

cd python-${{ matrix.distribution }}-${{ inputs.python_version }}-solaris${{ matrix.release }}-x86_64
chmod +x ./bin/python
./bin/python --version
./bin/python -m sysconfig
./bin/python ${{ github.workspace }}/scripts/test.py
./bin/pip3
- name: Test in VM
shell: solaris {0}
run: |
cd ${{ github.workspace }}
cat > /tmp/test.sh <<EOF
unzip python/python-${{ matrix.distribution }}-${{ inputs.python_version }}-solaris${{ matrix.release }}-x86_64.zip
if [[ "${{ inputs.run_tests }}" == "true" ]]; then
./bin/python -m test -v -ulargefile,network,decimal,cpu,subprocess,urlfetch,tzdata --timeout 60
fi
EOF
bash -e /tmp/test.sh
cd python-${{ matrix.distribution }}-${{ inputs.python_version }}-solaris${{ matrix.release }}-x86_64
chmod +x ./bin/python
./bin/python --version
./bin/python -m sysconfig
./bin/python ${{ github.workspace }}/scripts/test.py
./bin/pip3
if [[ "${{ inputs.run_tests }}" == "true" ]]; then
./bin/python -m test -v -ulargefile,network,decimal,cpu,subprocess,urlfetch,tzdata --timeout 60
fi
EOF
bash -e /tmp/test.sh
build_cosmo:
name: Cosmopolitan ${{ inputs.python_version }} (build)
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_freebsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ echo "::group::bzip2"
cd ${BUILDDIR}

wget --no-verbose -O bzip2.tar.gz https://github.com/commontk/bzip2/tarball/master
tar -xf bzip2*.tar.gz
tar --no-same-permissions --no-same-owner -xf bzip2*.tar.gz
rm *.tar.gz
cd commontk-bzip2*
mkdir build
Expand Down Expand Up @@ -375,7 +375,7 @@ fi
ldconfig -i -m -v ${DEPSDIR}/lib

wget --no-verbose -O portable-python-cmake-buildsystem.tar.gz https://github.com/bjia56/portable-python-cmake-buildsystem/tarball/${CMAKE_BUILDSYSTEM_BRANCH}
tar -xf portable-python-cmake-buildsystem.tar.gz
tar --no-same-permissions --no-same-owner -xf portable-python-cmake-buildsystem.tar.gz
rm *.tar.gz
mv *portable-python-cmake-buildsystem* portable-python-cmake-buildsystem
mkdir python-build
Expand Down
6 changes: 3 additions & 3 deletions scripts/build_solaris.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ echo "::group::autoconf"
cd ${BUILDDIR}

wget https://ftp.gnu.org/gnu/autoconf/autoconf-2.70.tar.gz
gtar xf autoconf-2.70.tar.gz
gtar --no-same-permissions --no-same-owner -xf autoconf-2.70.tar.gz
cd autoconf-2.70
./configure
gmake -j4
Expand Down Expand Up @@ -142,7 +142,7 @@ echo "::group::bzip2"
cd ${BUILDDIR}

wget --no-verbose -O bzip2.tar.gz https://github.com/commontk/bzip2/tarball/master
gtar -xf bzip2*.tar.gz
gtar --no-same-permissions --no-same-owner -xf bzip2*.tar.gz
rm *.tar.gz
cd commontk-bzip2*
mkdir build
Expand Down Expand Up @@ -408,7 +408,7 @@ else
fi

wget --no-verbose -O portable-python-cmake-buildsystem.tar.gz https://github.com/bjia56/portable-python-cmake-buildsystem/tarball/${CMAKE_BUILDSYSTEM_BRANCH}
gtar -xf portable-python-cmake-buildsystem.tar.gz
gtar --no-same-permissions --no-same-owner -xf portable-python-cmake-buildsystem.tar.gz
rm *.tar.gz
mv *portable-python-cmake-buildsystem* portable-python-cmake-buildsystem
mkdir python-build
Expand Down
4 changes: 2 additions & 2 deletions scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [[ "${PLATFORM}" == "solaris"* ]]; then
#set -x
file="$1"
download_and_verify $file
gtar -xf $file
gtar --no-same-permissions --no-same-owner -xf $file
rm $file
#set +x
}
Expand All @@ -42,7 +42,7 @@ else
#set -x
file="$1"
download_and_verify $file
tar -xf $file
tar --no-same-permissions --no-same-owner -xf $file
rm $file
#set +x
}
Expand Down

0 comments on commit 34a626f

Please sign in to comment.