Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cross-compilation builds #1976

Merged
merged 49 commits into from
Oct 4, 2022
Merged
Changes from 47 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4acb5b7
add conda build recipe + linux ci
pavelzw Oct 2, 2022
c7d738a
add ci for pr
pavelzw Oct 2, 2022
1c9d7fb
remove ci, add base.sh
pavelzw Oct 2, 2022
8e32a8d
Add macos + arm64 conda build
pavelzw Oct 2, 2022
d17ecca
add windows build
pavelzw Oct 2, 2022
682d6a1
windows-latest -> windows-2019
pavelzw Oct 2, 2022
d083ca1
tmate
pavelzw Oct 2, 2022
e35a4b7
Update recipe
pavelzw Oct 2, 2022
742669d
deactivate linux+macos
pavelzw Oct 2, 2022
0012077
apply patch
pavelzw Oct 2, 2022
3fc6711
add patch to requirements
pavelzw Oct 2, 2022
1e11aae
add m2-patch
pavelzw Oct 2, 2022
d830f24
Add powerpc
pavelzw Oct 2, 2022
ff12a50
move to p-w-m
pavelzw Oct 2, 2022
f7cb57c
conda-forge
pavelzw Oct 2, 2022
d156c84
conda mambabuild
pavelzw Oct 2, 2022
6c6c2d5
linux no docker
pavelzw Oct 2, 2022
be35ce1
?
pavelzw Oct 2, 2022
9296a9e
tmate
pavelzw Oct 2, 2022
e7817c9
Improve CI
pavelzw Oct 2, 2022
923e804
does this work?
pavelzw Oct 2, 2022
6930e43
fix workflow file
pavelzw Oct 2, 2022
12fccfb
fix workflow file 2
pavelzw Oct 2, 2022
964464c
remove conda recipe
pavelzw Oct 2, 2022
b76c2f4
fix macos
pavelzw Oct 2, 2022
e14b8e4
revert stuff
pavelzw Oct 2, 2022
ef90896
move to static_build.yml
pavelzw Oct 2, 2022
5316067
change name
pavelzw Oct 2, 2022
120c22f
change name
pavelzw Oct 2, 2022
517834d
is windows ci caching working?
pavelzw Oct 2, 2022
e0c8a50
Deduplicate code
pavelzw Oct 3, 2022
d197c5d
code review, debug test build
pavelzw Oct 3, 2022
e185a2c
add run-on-arch-action
pavelzw Oct 3, 2022
4542290
disable macos test temporarily
pavelzw Oct 3, 2022
bdb15dc
chmod +x
pavelzw Oct 3, 2022
47fa2a9
move run-on-arch-action to step before
pavelzw Oct 3, 2022
4048121
does it work?
pavelzw Oct 3, 2022
2bfa794
and this?
pavelzw Oct 3, 2022
d126689
${{ github.workspace }}
pavelzw Oct 3, 2022
db185d2
readd macos
pavelzw Oct 3, 2022
7c41a12
remove line
pavelzw Oct 3, 2022
9be6d2a
update tests
pavelzw Oct 3, 2022
fe73df6
fix tests?
pavelzw Oct 3, 2022
52bab4b
remove unbound variable
pavelzw Oct 3, 2022
97cc281
install ca-certificates
pavelzw Oct 3, 2022
454f654
apt update
pavelzw Oct 3, 2022
3eeeb38
remove micromamba create test
pavelzw Oct 3, 2022
0f307b2
add comment, does apt -y work?
pavelzw Oct 4, 2022
3e9acf3
easier to read sed command
pavelzw Oct 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 60 additions & 41 deletions .github/workflows/static_build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Fully static binary builds
name: Micromamba static builds

on:
push:
Expand All @@ -13,58 +13,77 @@ concurrency:
cancel-in-progress: true

jobs:
micromamba_full_static:
conda-build:
name: "micromamba - ${{ matrix.platform }}-${{ matrix.arch }}"
runs-on: ${{ matrix.os }}
env:
CI: True
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
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 }
steps:
- uses: actions/checkout@v3
- name: create build environment
uses: mamba-org/provision-with-micromamba@main
- name: Checkout branch
uses: actions/checkout@v3
- name: Checkout micromamba-feedstock
uses: actions/checkout@v3
with:
environment-file: ./micromamba/environment-dev.yml
environment-name: build_env
cache-env: true
- name: create build environment
run: micromamba install -y -n build_env -f ./libmamba/environment-static-dev.yml
- uses: hendrikmuhs/ccache-action@main
repository: conda-forge/micromamba-feedstock
path: micromamba-feedstock
- name: Patch micromamba-feedstock
if: ${{ matrix.platform == 'linux' }}
run: |
sed -i -E ':a; N; $!ba; s/url:.*libmamba.patch/git_url: ..\/..\//g' micromamba-feedstock/recipe/meta.yaml
pavelzw marked this conversation as resolved.
Show resolved Hide resolved
- name: Patch micromamba-feedstock
if: ${{ matrix.platform == 'osx' }}
run: |
sed -i '' -E 's/url:.*/git_url: ..\/..\//' micromamba-feedstock/recipe/meta.yaml
sed -i '' '/sha256:/d' micromamba-feedstock/recipe/meta.yaml
sed -i '' '/patches:/d' micromamba-feedstock/recipe/meta.yaml
sed -i '' '/libmamba.patch/d' micromamba-feedstock/recipe/meta.yaml
- uses: mamba-org/provision-with-micromamba@main
with:
variant: sccache
key: ${{ github.job }}-${{ matrix.os }}
- name: build micromamba
channels: conda-forge
environment-file: false
environment-name: mambabuild
extra-specs: boa
- name: Build conda package
shell: bash -l {0}
run: |
micromamba activate build_env
mkdir build
cd build
cmake .. -DBUILD_LIBMAMBA=ON \
-DBUILD_STATIC_DEPS=ON \
-DBUILD_STATIC=ON \
-DBUILD_MICROMAMBA=ON \
-DMICROMAMBA_STATIC_DEPS=ON \
-DMICROMAMBA_LINKAGE=FULL_STATIC \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-GNinja
ninja
- name: check that micromamba runs
run: conda mambabuild -m micromamba-feedstock/.ci_support/${{ matrix.platform }}_${{ matrix.arch }}_.yaml micromamba-feedstock/recipe ${{ matrix.arch != '64' && '--no-test' || '' }}
- name: Unpack micromamba package
shell: bash -l {0}
run: |
micromamba activate build_env
build/micromamba/micromamba --version
- name: build cache statistics
run: sccache --show-stats
- uses: actions/upload-artifact@v3
cd $MAMBA_ROOT_PREFIX/envs/mambabuild/conda-bld/${{ matrix.platform }}-${{ matrix.arch }}
tar -xvf micromamba-*.tar.bz2
mkdir -p ${{ github.workspace }}/artifacts
cp bin/micromamba ${{ github.workspace }}/artifacts
- name: Test micromamba on emulated target architecture
if: ${{ matrix.arch != '64' && matrix.platform == 'linux' }}
uses: uraimo/run-on-arch-action@v2
with:
name: Fully static binary (${{ matrix.os }})
path: build/micromamba/micromamba
arch: ${{ matrix.arch }}
distro: ubuntu_latest
dockerRunArgs: |
-v "${{ github.workspace }}/artifacts:/artifacts"
run: |
cd /artifacts
./micromamba --version
./micromamba --help
./micromamba
- name: Upload micromamba
uses: actions/upload-artifact@v2
with:
name: micromamba-${{ matrix.platform }}-${{ matrix.arch }}
path: ${{ github.workspace }}/artifacts/micromamba

micromamba_full_static_win:
# Don't run this job branches because it is very slow
if: github.ref == 'refs/heads/main'

# These build instructions are based on https://github.com/conda-forge/micromamba-feedstock
name: "micromamba - win-64"
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -136,5 +155,5 @@ jobs:
if %errorlevel% neq 0 exit /b %errorlevel%
- uses: actions/upload-artifact@v3
with:
name: Fully static binary (windows-2019)
name: micromamba-win-64
path: build/micromamba/micromamba.exe