TestReleaseCode #7
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
name: TestReleaseCode | |
on: | |
workflow_dispatch: | |
env: | |
CIBW_TEST_COMMAND: | | |
python -m krypton --clean | |
python -m unittest discover -s {project}/tests -p "*test*.py" --verbose | |
CIBW_TEST_EXTRAS: 'tests' | |
concurrency: | |
group: ci-tests-release-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
buildLinuxArm: | |
env: | |
CIBW_ARCHS: aarch64 | |
CIBW_TEST_SKIP: pp* # We do not test PyPy because we don't want to compile cryptography - which is needed for tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: "true" | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
- name: Build Extension | |
run: | | |
python3 -m pip install cibuildwheel | |
python3 -m cibuildwheel --output-dir dist | |
env: | |
CIBW_ENVIRONMENT: VCPKG_FORCE_SYSTEM_BINARIES=1 | |
CIBW_BEFORE_ALL: | | |
which gcc | |
if type apk &> /dev/null; then | |
apk add build-base cmake ninja zip unzip curl git | |
fi | |
if type yum &> /dev/null; then | |
yum install -y curl zip unzip tar | |
curl -o setupCmake.sh -sSSL https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-linux-aarch64.sh | |
chmod a+rx setupCmake.sh | |
./setupCmake.sh --skip-license --exclude-subdir | |
git clone https://github.com/ninja-build/ninja.git && cd ninja | |
git checkout release | |
cmake -Bbuild-cmake | |
cmake --build build-cmake | |
cd .. | |
cp -r ninja/build-cmake/* bin/ | |
fi | |
export PATH="{package}/bin:/usr/bin:$PATH" | |
./vcpkg/bootstrap-vcpkg.sh | |
./vcpkg/vcpkg install --triplet arm64-linux | |
- name: Get Logs | |
if: always() | |
run: | | |
cat /project/vcpkg/buildtrees/detect_compiler/config-arm64-linux-rel-CMakeCache.txt.log | |
cat /project/vcpkg/buildtrees/detect_compiler/config-arm64-linux-rel-out.log | |
cat /project/vcpkg/buildtrees/detect_compiler/config-arm64-linux-rel-err.log | |
- name: Upload Build Result | |
uses: actions/upload-artifact@v4 | |
with: | |
name: AutoBuild-Linux-Arm-${{ github.event.release.tag_name }} | |
path: ${{ github.workspace }}/dist/*.* |