Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
jjerphan authored Dec 2, 2024
2 parents 2b70c2f + 3f49aa5 commit 167f9c9
Show file tree
Hide file tree
Showing 213 changed files with 5,878 additions and 1,702 deletions.
4 changes: 2 additions & 2 deletions .github/actions/workspace/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ runs:
steps:
- name: Create workspace
if: ${{ inputs.action == 'save' }}
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: ${{ inputs.path }}
key: ${{ inputs.key_prefix }}-${{ inputs.key_base }}-${{ inputs.key_suffix }}
- name: Restore workspace
if: ${{ inputs.action == 'restore' }}
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: ${{ inputs.path }}
key: ${{ inputs.key_prefix }}-${{ inputs.key_base }}-${{ inputs.key_suffix }}
Expand Down
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: .github/actions/workspace/
schedule:
interval: weekly
47 changes: 47 additions & 0 deletions .github/workflows/brew.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Homebrew and Linuxbrew toolchains

on:
workflow_call:

jobs:
build_linuxbrew:
name: Build on linuxbrew
runs-on: ubuntu-latest
container:
image: homebrew/brew:latest

steps:
# v1 required due to permissions error
- name: Checkout mamba repository
uses: actions/checkout@v1

- name: Correct the creation permissions
run: sudo chown -R linuxbrew .

- name: Install host and build dependencies
run: brew install fmt libarchive libsolv lz4 openssl@3 reproc simdjson xz yaml-cpp zstd cmake cli11 nlohmann-json spdlog tl-expected curl pkgconfig python bzip2 krb5 zlib

- name: Configure to build mamba
run: cmake -S. -Bbuild -DBUILD_LIBMAMBA=ON -DBUILD_MAMBA=ON -DBUILD_SHARED=ON -DBUILD_STATIC=OFF

- name: Build mamba
run: cmake --build build -j4

build_homebrew:
name: Build on homebrew
runs-on: macos-13

steps:
- name: Checkout mamba repository
uses: actions/checkout@v4

- name: Install host and build dependencies
run: brew install fmt libarchive libsolv lz4 openssl@3 reproc simdjson xz yaml-cpp zstd cmake cli11 nlohmann-json spdlog tl-expected pkgconfig python

- name: Configure to build mamba
run: >
cmake -S. -Bbuild -DBUILD_LIBMAMBA=ON -DBUILD_MAMBA=ON -DBUILD_SHARED=ON -DBUILD_STATIC=OFF
-DLibArchive_ROOT=$(brew --prefix libarchive)
- name: Build mamba
run: cmake --build build -j4
22 changes: 10 additions & 12 deletions .github/workflows/conda_canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,16 @@ jobs:
restore-keys: conda-canary-
- name: build libmamba Python bindings
run: |
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DBUILD_LIBMAMBAPY=ON \
-DBUILD_LIBMAMBA=ON \
-DBUILD_SHARED=ON \
-DBUILD_MAMBA_PACKAGE=ON \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-GNinja
ninja
ninja install
cmake -B build/ -G Ninja \
-D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-D BUILD_LIBMAMBAPY=ON \
-D BUILD_LIBMAMBA=ON \
-D BUILD_SHARED=ON \
-D BUILD_MAMBA_PACKAGE=ON \
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
-D CMAKE_C_COMPILER_LAUNCHER=sccache
cmake --build build/ --parallel
cmake --install build/
- name: install libmambapy
run: pip install -e ./libmambapy/ --no-deps
- name: build cache statistics
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Check labels
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
env:
PRE_COMMIT_USE_MICROMAMBA: 1
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install pre-commit
uses: mamba-org/setup-micromamba@v1
with:
Expand Down
73 changes: 46 additions & 27 deletions .github/workflows/static_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,24 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, platform: linux, arch: "64" }
- { os: ubuntu-latest, platform: linux, arch: aarch64 }
- { os: ubuntu-latest, platform: linux, arch: ppc64le }
- { os: macos-latest, platform: osx, arch: "64" }
- { os: macos-latest, platform: osx, arch: arm64 }
- {os: ubuntu-latest, platform: linux, arch: "64"}
- {os: ubuntu-latest, platform: linux, arch: aarch64}
- {os: ubuntu-latest, platform: linux, arch: ppc64le}
- {os: macos-latest, platform: osx, arch: "64"}
- {os: macos-latest, platform: osx, arch: arm64}
steps:
- name: Checkout micromamba-feedstock
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: conda-forge/micromamba-feedstock
path: micromamba-feedstock
- name: Disable output validation
if: ${{ matrix.platform == 'osx' }}
run: |
cd micromamba-feedstock/
sed -i '' '/conda_forge_output_validation/d' conda-forge.yml
- name: Checkout mamba branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: mamba
- name: Clear mamba git directory and link source
Expand All @@ -50,11 +55,11 @@ jobs:
mv mamba/ micromamba-feedstock/source
# Prevent irrelevant file permission error
git -C micromamba-feedstock/ config --local --add safe.directory '*'
- uses: mamba-org/setup-micromamba@v1
- uses: mamba-org/setup-micromamba@v2
with:
environment-name: mambabuild
create-args: python boa
post-cleanup: none # FIXME the cleanup fails on OSX
post-cleanup: none # FIXME the cleanup fails on OSX
- name: Build conda package (Unix native)
if: ${{ !(matrix.platform == 'linux' && matrix.arch != '64') }}
shell: bash -l {0}
Expand Down Expand Up @@ -94,29 +99,38 @@ jobs:
"micromamba-feedstock/build_artifacts/${{ matrix.platform }}-${{ matrix.arch }}/"micromamba-*.tar.bz2 "pkg/"
mkdir -p "${{ github.workspace }}/artifacts"
cp pkg/bin/micromamba "${{ github.workspace }}/artifacts"
- name: Test basic commands
if: ${{ matrix.arch != 'aarch64' && matrix.arch != 'ppc64le' }}
run: |
mkdir test_prefix
${{ github.workspace }}/artifacts/micromamba --version
${{ github.workspace }}/artifacts/micromamba --help
${{ github.workspace }}/artifacts/micromamba env create -y -n testenv -r ./test_prefix "python<3.13"
${{ github.workspace }}/artifacts/micromamba list -n testenv -r ./test_prefix --log-level 1
- name: Archive conda-build artifact
if: failure()
run: tar -czf ${{ github.workspace }}/micromamba-conda-build-failed-${{ matrix.platform }}-${{ matrix.arch }}.tar.gz $MAMBA_ROOT_PREFIX/envs/mambabuild/conda-bld/micromamba_*
- name: Upload conda build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: micromamba-conda-build-failed-${{ matrix.platform }}-${{ matrix.arch }}
path: ${{ github.workspace }}/micromamba-conda-build-failed-${{ matrix.platform }}-${{ matrix.arch }}.tar.gz
retention-days: 7
- name: Upload micromamba
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: micromamba-${{ matrix.platform }}-${{ matrix.arch }}
path: ${{ github.workspace }}/artifacts/micromamba

micromamba-static-win:
name: "win-64"
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache vcpkg packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
# The installed packages are in %VCPKG_INSTALLATION_ROOT%\installed\x64-windows-static
# and the info which packages are installed is in %VCPKG_INSTALLATION_ROOT%\installed\vcpkg
Expand All @@ -133,40 +147,36 @@ jobs:
key: sccache-${{ github.job }}-win-64
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- uses: mamba-org/setup-micromamba@v1
- uses: mamba-org/setup-micromamba@v2
with:
environment-name: mambabuild
init-shell: bash cmd.exe
# Constraint on fmt is due to an issue with 11.0.2 (to be fixed in next version)
# cf. https://github.com/fmtlib/fmt/issues/4091
create-args: >-
cli11>=2.2,<3
cpp-expected
nlohmann_json
simdjson-static>=3.3.0
spdlog
fmt
fmt<=11.0.1
yaml-cpp-static>=0.8.0
libsolv-static>=0.7.24
reproc-cpp-static>=14.2.4.post0
- name: build micromamba
shell: cmd /C call {0}
# Using D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR is a workaround to fix CI failure on win-64
# after updating runners to 20240603.1 image
# (cf. https://github.com/actions/runner-images/issues/10004#issuecomment-2153445161)
run: |
set CMAKE_PREFIX_PATH=.\vcpkg_installed\x64-windows-static-md;%CONDA_PREFIX%\Library
cmake -S . ^
-B build ^
cmake -B build/ -G Ninja ^
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache ^
-D CMAKE_C_COMPILER_LAUNCHER=sccache ^
-D CMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" ^
-D CMAKE_CXX_FLAGS=" /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR" ^
-D CMAKE_BUILD_TYPE="Release" ^
-D BUILD_LIBMAMBA=ON ^
-D BUILD_STATIC=ON ^
-D BUILD_MICROMAMBA=ON ^
-G "Ninja"
-D BUILD_MICROMAMBA=ON
if %errorlevel% neq 0 exit /b %errorlevel%
cmake --build build
cmake --build build/ --parallel
if %errorlevel% neq 0 exit /b %errorlevel%
sccache --show-stats
if %errorlevel% neq 0 exit /b %errorlevel%
Expand All @@ -179,14 +189,23 @@ jobs:
- name: Archive-build artifact
if: failure()
run: tar -czf ${{ github.workspace }}/micromamba-build-failed-win-64.tar.gz ${{ github.workspace }}/build/

- name: Test basic commands
run: |
mkdir test_prefix
${{ github.workspace }}/build/micromamba/micromamba.exe --version
${{ github.workspace }}/build/micromamba/micromamba.exe --help
${{ github.workspace }}/build/micromamba/micromamba.exe env create -y -n testenv -r ./test_prefix "python<3.13"
${{ github.workspace }}/build/micromamba/micromamba.exe list -n testenv -r ./test_prefix --log-level 1
- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: micromamba-build-failed-win-64
path: ${{ github.workspace }}/micromamba-build-failed-win-64.tar.gz
retention-days: 7
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: micromamba-win-64
path: ${{ github.workspace }}/build/micromamba/micromamba.exe
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ jobs:
with:
os: ${{ matrix.os }}
build_type: ${{ matrix.build_type }}

brew_tests:
name: Homebrew and Linuxbrew toolchains
uses: ./.github/workflows/brew.yml
13 changes: 7 additions & 6 deletions .github/workflows/unix_impl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Checkout mamba repository
uses: actions/checkout@v4
- name: Create build environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ./dev/environment-dev.yml
environment-name: build_env
Expand All @@ -40,7 +40,8 @@ jobs:
--preset mamba-unix-shared-${{ inputs.build_type }} \
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
-D BUILD_LIBMAMBAPY=OFF
-D BUILD_LIBMAMBAPY=OFF \
-D ENABLE_MAMBA_ROOT_PREFIX_FALLBACK=OFF
cmake --build build/ --parallel
- name: Show build cache statistics
run: sccache --show-stats
Expand Down Expand Up @@ -69,7 +70,7 @@ jobs:
path: build/
key_suffix: ${{ inputs.os }}-${{ inputs.build_type }}
- name: Create build environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ./build/environment.lock
environment-name: build_env
Expand All @@ -95,7 +96,7 @@ jobs:
path: build/
key_suffix: ${{ inputs.os }}-${{ inputs.build_type }}
- name: Create build environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ./build/environment.lock
environment-name: build_env
Expand All @@ -122,7 +123,7 @@ jobs:
path: build/
key_suffix: ${{ inputs.os }}-${{ inputs.build_type }}
- name: Create build environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ./build/environment.lock
environment-name: build_env
Expand Down Expand Up @@ -179,7 +180,7 @@ jobs:
path: build/
key_suffix: ${{ inputs.os }}-${{ inputs.build_type }}
- name: Create build environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ./build/environment.lock
environment-name: build_env
Expand Down
Loading

0 comments on commit 167f9c9

Please sign in to comment.