11name : Build
22
33on :
4+ pull_request :
45 push :
56 branches :
67 - main
1819 matrix :
1920 target : [x86_64, aarch64]
2021 steps :
21- - uses : actions/checkout@v3
22+ - uses : actions/checkout@v4
2223 - uses : actions/setup-python@v4
2324 with :
2425 python-version : " 3.10"
3536 args : --release --out dist --find-interpreter
3637 sccache : " true"
3738 manylinux : ${{ matrix.target == 'aarch64' && 'manylinux_2_28' || 'auto' }}
38- before-script-linux : " pip install uniffi-bindgen==0.24.1"
39+ before-script-linux : |
40+ pip install uniffi-bindgen==0.24.1
41+
42+ # ISSUE: https://github.com/sfackler/rust-openssl/issues/2036#issuecomment-1724324145
43+ # If we're running on rhel centos, install needed packages.
44+ if command -v yum &> /dev/null; then
45+ yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
46+
47+ # If we're running on i686 we need to symlink libatomic
48+ # in order to build openssl with -latomic flag.
49+ if [[ ! -d "/usr/lib64" ]]; then
50+ ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
51+ fi
52+ else
53+ # If we're running on debian-based system.
54+ apt update -y && apt-get install -y libssl-dev openssl pkg-config
55+ fi
56+
3957 - name : Upload wheels
4058 uses : actions/upload-artifact@v3
4159 with :
4866 matrix :
4967 target : [x64, x86]
5068 steps :
51- - uses : actions/checkout@v3
69+ - uses : actions/checkout@v4
5270 - uses : actions/setup-python@v4
5371 with :
5472 python-version : ' 3.10'
7088 macos_x86 :
7189 runs-on : macos-latest
7290 steps :
73- - uses : actions/checkout@v3
91+ - uses : actions/checkout@v4
7492 - uses : actions/setup-python@v4
7593 with :
7694 python-version : ' 3.10'
91109 macos_aarch64 :
92110 runs-on : macos-latest-large
93111 steps :
94- - uses : actions/checkout@v3
112+ - uses : actions/checkout@v4
95113 - uses : actions/setup-python@v4
96114 with :
97115 python-version : ' 3.10'
@@ -112,7 +130,7 @@ jobs:
112130 sdist :
113131 runs-on : ubuntu-latest
114132 steps :
115- - uses : actions/checkout@v3
133+ - uses : actions/checkout@v4
116134 - name : Build sdist
117135 uses : PyO3/maturin-action@v1
118136 with :
0 commit comments