Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Archiving the project (#179) #240

Archiving the project (#179)

Archiving the project (#179) #240

Workflow file for this run

name: CI static
on:
push:
branches:
- main
pull_request:
branches:
- main
defaults:
run:
shell: bash -l {0}
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: create build environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: environment-static-dev.yml
condarc-file: .condarc
- name: configure powerloader build
run: |
mkdir build; cd build
export USE_ZCHUNK=ON
cmake .. \
-GNinja \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DWITH_ZCHUNK=$USE_ZCHUNK \
-DBUILD_STATIC=ON \
-DBUILD_EXE=ON
- name: build powerloader
run: |
cd build
ninja
- name: run powerloader tests
run: |
cd build
ninja test
test_win:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: create build environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: environment-static-dev-win.yml
environment-name: build_env
cache-env: true
condarc-file: .condarc
- name: fix up vcpkg recipes
shell: python
run: |
# See https://github.com/microsoft/vcpkg/pull/28919
import os
from pathlib import Path
vcpkg_root = Path(os.environ["MAMBA_ROOT_PREFIX"]) / "envs" / "build_env" / "Library" / "share" / "vcpkg"
f = vcpkg_root / "scripts" / "cmake" / "vcpkg_acquire_msys.cmake"
text = f.read_text()
text = text.replace("b309799e5a9d248ef66eaf11a0bd21bf4e8b9bd5c677c627ec83fa760ce9f0b54ddf1b62cbb436e641fbbde71e3b61cb71ff541d866f8ca7717a3a0dbeb00ebf",
"a202ddaefa93d8a4b15431dc514e3a6200c47275c5a0027c09cc32b28bc079b1b9a93d5ef65adafdc9aba5f76a42f3303b1492106ddf72e67f1801ebfe6d02cc")
text = text.replace("https://repo.msys2.org/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz", "https://repo.msys2.org/msys/x86_64/libtool-2.4.7-3-x86_64.pkg.tar.zst")
f.write_text(text)
- name: build static dependencies
shell: cmd /C CALL {0}
run: |
call micromamba activate build_env
SET VCPKG_BUILD_TYPE=release && vcpkg install "libarchive[bzip2,lz4,lzma,lzo,openssl,zstd]" --triplet x64-windows-static
if %errorlevel% neq 0 exit /b %errorlevel%
vcpkg install curl --triplet x64-windows-static
if %errorlevel% neq 0 exit /b %errorlevel%
set CMAKE_PREFIX_PATH=%VCPKG_ROOT%\installed\x64-windows-static\;%CMAKE_PREFIX_PATH%
if %errorlevel% neq 0 exit /b %errorlevel%
- name: configure powerloader build
shell: cmd /C CALL {0}
run: |
call micromamba activate build_env
mkdir build
cd build
cmake .. ^
-D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-D CMAKE_PREFIX_PATH="%VCPKG_ROOT%\installed\x64-windows-static;%CMAKE_PREFIX_PATH%" ^
-D WITH_ZCHUNK=ON ^
-D BUILD_STATIC=ON ^
-D BUILD_EXE=ON ^
-G "Ninja"
- name: build powerloader
shell: cmd /C CALL {0}
run: |
call micromamba activate build_env
cd build
ninja
- name: run powerloader test
shell: cmd /C CALL {0}
run: |
call micromamba activate build_env
cd build
ninja test