Skip to content

Commit 97d9bd2

Browse files
authored
Merge pull request #849 from HEXRD/linux-packaging-update
Update Linux packaging to build using AlmaLinux 8
2 parents c1c97a2 + 808b5c5 commit 97d9bd2

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed
Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,40 @@
11
#!/usr/bin/env bash
22
cd /github/workspace/
33

4-
# Use archive mirror for CentOS 7 until we are ready to migrate to CentOS 8
5-
sed -i -e 's/mirrorlist/#mirrorlist/g' \
6-
-e 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' \
7-
/etc/yum.repos.d/CentOS-*
8-
94
# Install dependencies
10-
yum install -y wget git centos-release-scl ca-certificates
11-
12-
# Need to install packages that depend on centos-release-scl on a different line.
13-
# This will use gcc==10, which is the same as what manylinux2014 uses.
14-
yum install -y devtoolset-10
5+
# Use gcc-14 for manylinux_2_28
6+
yum install -y wget git gcc-toolset-14
157

168
# Enable this toolset
17-
source /opt/rh/devtoolset-10/enable
9+
source /opt/rh/gcc-toolset-14/enable
1810

1911
# Download and install miniconda
2012
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
2113
chmod a+x Miniconda3-latest-Linux-x86_64.sh
2214
./Miniconda3-latest-Linux-x86_64.sh -b
2315

16+
# Activate conda
17+
source $HOME/miniconda3/bin/activate
18+
2419
# The base needs to have the same python version (3.11, right now)
25-
${HOME}/miniconda3/bin/conda install python=3.11 -y
20+
conda install --override-channels -c conda-forge python=3.11 -y
2621

2722
# Set up the hexrd channel
28-
${HOME}/miniconda3/bin/conda create --override-channels -c conda-forge -y -n hexrd python=3.11
29-
${HOME}/miniconda3/bin/activate hexrd
30-
${HOME}/miniconda3/bin/conda activate hexrd
23+
conda create --override-channels -c conda-forge -y -n hexrd python=3.11
24+
conda activate hexrd
3125

3226
# Install the libmamba solver (it is much faster)
33-
${HOME}/miniconda3/bin/conda install -n base -c conda-forge conda-libmamba-solver
34-
${HOME}/miniconda3/bin/conda config --set solver libmamba
35-
${HOME}/miniconda3/bin/conda config --set conda_build.pkg_format 1 # force tar.bz2 files
27+
conda install -n base -c conda-forge conda-libmamba-solver
28+
conda config --set solver libmamba
29+
conda config --set conda_build.pkg_format 1 # force tar.bz2 files
3630

3731

3832
# Remove anaconda telemetry (it is causing errors for us)
39-
${HOME}/miniconda3/bin/conda remove -n base conda-anaconda-telemetry
33+
conda remove -n base conda-anaconda-telemetry
4034

4135
# Install conda build and create output directory
42-
${HOME}/miniconda3/bin/conda install --override-channels -c conda-forge conda-build -y
36+
conda install --override-channels -c conda-forge conda-build -y
4337
mkdir output
4438

4539
# Build the package
46-
${HOME}/miniconda3/bin/conda build --override-channels -c conda-forge --output-folder output/ conda.recipe/
40+
conda build --override-channels -c conda-forge --output-folder output/ conda.recipe/

.github/workflows/package.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ jobs:
8080

8181
- name: Build the package (container)
8282
if: ${{ matrix.config.name == 'Linux' }}
83-
uses: docker://centos:7
83+
# AlmaLinux 8 is used for manylinux_2_28 support. This supports glibc
84+
# 2.28 and later, which supports linux OS's starting in August 2018.
85+
# AlmaLinux 8 will be supported with security updates until 2029.
86+
uses: docker://almalinux:8
8487
with:
8588
entrypoint: /github/workspace/.github/workflows/container_build.sh
8689

0 commit comments

Comments
 (0)