File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Setup milk
2+ description : Build and cache the milk-org/milk library with Python module support
3+
4+ inputs :
5+ milk-version :
6+ description : Git commit, tag, or branch of milk-org/milk to build
7+ required : false
8+ default : ' 3c12d7f9e7a88d6a8184161f337d1f71e24b931f'
9+ install-prefix :
10+ description : Installation prefix for milk
11+ required : false
12+ default : ' /usr/local/milk'
13+
14+ runs :
15+ using : composite
16+ steps :
17+ - name : Install system dependencies
18+ shell : bash
19+ run : |
20+ sudo apt-get update
21+ sudo apt-get install -y cmake pkg-config libcfitsio-dev pybind11-dev
22+
23+ - name : Cache milk install
24+ id : cache-milk
25+ uses : actions/cache@v4
26+ with :
27+ path : ${{ inputs.install-prefix }}
28+ key : milk-${{ inputs.milk-version }}-${{ runner.os }}
29+
30+ - name : Build and install milk
31+ if : steps.cache-milk.outputs.cache-hit != 'true'
32+ shell : bash
33+ run : |
34+ git clone --recursive https://github.com/milk-org/milk.git /tmp/milk-build
35+ cd /tmp/milk-build
36+ git checkout ${{ inputs.milk-version }}
37+ git submodule update --init --recursive
38+ mkdir _build && cd _build
39+ cmake .. \
40+ -DCMAKE_INSTALL_PREFIX=${{ inputs.install-prefix }} \
41+ -Dbuild_python_module=ON
42+ make -j$(nproc)
43+ sudo make install
44+ rm -rf /tmp/milk-build
45+
46+ - name : Configure library paths
47+ shell : bash
48+ run : |
49+ sudo ldconfig
50+ echo "MILK_INSTALLDIR=${{ inputs.install-prefix }}" >> "$GITHUB_ENV"
51+ echo "LD_LIBRARY_PATH=${{ inputs.install-prefix }}/lib:${LD_LIBRARY_PATH}" >> "$GITHUB_ENV"
Original file line number Diff line number Diff line change 1717 steps :
1818 - uses : actions/checkout@v4
1919
20+ - name : Build and cache milk
21+ uses : ./.github/actions/setup-milk
22+
2023 - name : Set up Python
2124 id : setup-python
2225 uses : actions/setup-python@v5
You can’t perform that action at this time.
0 commit comments