Skip to content

Commit b768834

Browse files
authored
fix releases ci (#74)
1 parent 107ffcd commit b768834

File tree

2 files changed

+77
-63
lines changed

2 files changed

+77
-63
lines changed

.github/workflows/releases.yml

Lines changed: 76 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,28 @@ env:
1616
jobs:
1717
build-linux-release:
1818
name: Build release for Linux
19-
runs-on: ubuntu-24.04
19+
runs-on: ubuntu-22.04
2020

2121
steps:
2222
- name: Checkout sources
2323
uses: actions/checkout@v3
2424
with:
2525
fetch-depth: 0
26-
26+
- name: Free up disk space
27+
run: |
28+
sudo rm -rf /usr/share/dotnet
29+
sudo rm -rf /opt/ghc
30+
sudo rm -rf /usr/local/share/boost
31+
[ -n "$AGENT_TOOLSDIRECTORY" ] && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
32+
sudo rm -rf /usr/local/lib/android
33+
sudo rm -rf /usr/share/swift
34+
sudo rm -rf /usr/local/.ghcup
35+
sudo rm -rf /usr/lib/jvm
36+
sudo rm -rf /usr/local/share/powershell
37+
sudo rm -rf /usr/share/miniconda
38+
sudo docker system prune -af --volumes
39+
sudo apt-get clean
40+
df -h
2741
- name: Install dependencies
2842
run: |
2943
sudo apt update -y
@@ -68,9 +82,9 @@ jobs:
6882
cd ..
6983
7084
- name: Install CUDA
71-
uses: Jimver/cuda-toolkit@v0.2.19
85+
uses: Jimver/cuda-toolkit@v0.2.23
7286
with:
73-
cuda: '12.4.1'
87+
cuda: "12.4.1"
7488

7589
- name: Install stable toolchain
7690
uses: actions-rs/toolchain@v1
@@ -154,61 +168,61 @@ jobs:
154168
needs: [create-github-release]
155169
environment: CI
156170
steps:
157-
- name: Checkout sources
158-
uses: actions/checkout@v4
159-
160-
- name: Install stable, minimal toolchain
161-
uses: dtolnay/rust-toolchain@v1
162-
with:
163-
toolchain: stable
164-
165-
- name: Install dependencies
166-
run: |
167-
sudo apt update -y
168-
sudo apt install -y \
169-
tzdata \
170-
build-essential \
171-
pkg-config \
172-
cmake \
173-
curl \
174-
git \
175-
lcov \
176-
libhdf5-dev \
177-
libfreetype-dev \
178-
libexpat1-dev \
179-
libfontconfig-dev \
180-
;
181-
env:
182-
DEBIAN_FRONTEND: noninteractive
183-
184-
# We install cfitsio because when releasing to crates.io, it runs
185-
# the rust docs generation which fails if our code does any
186-
# writing. With feature cfitsio-static, it has to build cfitsio which
187-
# involves writing so have to build without that feature when pushing
188-
# to crates.io
189-
- name: Install cfitsio 3.49
190-
run: |
191-
curl "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.49.tar.gz" -o cfitsio.tar.gz
192-
tar -xf cfitsio.tar.gz
193-
rm cfitsio.tar.gz
194-
cd cfitsio-3.49
195-
# Enabling SSE2/SSSE3 could cause portability problems, but it's unlikely that anyone
196-
# is using such a CPU...
197-
# https://stackoverflow.com/questions/52858556/most-recent-processor-without-support-of-ssse3-instructions
198-
# Disabling curl just means you cannot fits_open() using a URL.
199-
CFLAGS="-O3" ./configure --prefix=/usr/local --enable-reentrant --enable-sse2 --enable-ssse3 --disable-curl
200-
201-
make -j
202-
sudo make install
203-
sudo ldconfig
204-
205-
cd ..
206-
rm -rf cfitsio-3.49
207-
208-
- name: Build on latest stable rust
209-
run: cargo build --release
210-
211-
- uses: katyo/publish-crates@v2
212-
with:
213-
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
214-
args: --no-verify
171+
- name: Checkout sources
172+
uses: actions/checkout@v4
173+
174+
- name: Install stable, minimal toolchain
175+
uses: dtolnay/rust-toolchain@v1
176+
with:
177+
toolchain: stable
178+
179+
- name: Install dependencies
180+
run: |
181+
sudo apt update -y
182+
sudo apt install -y \
183+
tzdata \
184+
build-essential \
185+
pkg-config \
186+
cmake \
187+
curl \
188+
git \
189+
lcov \
190+
libhdf5-dev \
191+
libfreetype-dev \
192+
libexpat1-dev \
193+
libfontconfig-dev \
194+
;
195+
env:
196+
DEBIAN_FRONTEND: noninteractive
197+
198+
# We install cfitsio because when releasing to crates.io, it runs
199+
# the rust docs generation which fails if our code does any
200+
# writing. With feature cfitsio-static, it has to build cfitsio which
201+
# involves writing so have to build without that feature when pushing
202+
# to crates.io
203+
- name: Install cfitsio 3.49
204+
run: |
205+
curl "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.49.tar.gz" -o cfitsio.tar.gz
206+
tar -xf cfitsio.tar.gz
207+
rm cfitsio.tar.gz
208+
cd cfitsio-3.49
209+
# Enabling SSE2/SSSE3 could cause portability problems, but it's unlikely that anyone
210+
# is using such a CPU...
211+
# https://stackoverflow.com/questions/52858556/most-recent-processor-without-support-of-ssse3-instructions
212+
# Disabling curl just means you cannot fits_open() using a URL.
213+
CFLAGS="-O3" ./configure --prefix=/usr/local --enable-reentrant --enable-sse2 --enable-ssse3 --disable-curl
214+
215+
make -j
216+
sudo make install
217+
sudo ldconfig
218+
219+
cd ..
220+
rm -rf cfitsio-3.49
221+
222+
- name: Build on latest stable rust
223+
run: cargo build --release
224+
225+
- uses: katyo/publish-crates@v2
226+
with:
227+
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
228+
args: --no-verify

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)