-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub actions doesn't support ubuntu-18.04 any more, so binaries are now built with ubuntu-20.04. Update the CI scripts.
- Loading branch information
Showing
7 changed files
with
98 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,11 @@ env: | |
jobs: | ||
build-linux-release: | ||
name: Build release for Linux | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
|
@@ -32,14 +32,39 @@ jobs: | |
cmake \ | ||
curl \ | ||
git \ | ||
libz-dev \ | ||
software-properties-common \ | ||
; | ||
# This comes from software-properties-common, and is only necessary | ||
# to install gcc-12. Remove this when we use a newer ubuntu image. | ||
# https://stackoverflow.com/a/67453352 | ||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | ||
sudo apt update -y | ||
sudo apt install -y gcc-11 g++-11 | ||
sudo update-alternatives \ | ||
--install /usr/bin/gcc gcc /usr/bin/gcc-11 110 \ | ||
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \ | ||
--slave /usr/bin/gcov gcov /usr/bin/gcov-11 \ | ||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \ | ||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 | ||
gcc --version | ||
g++ --version | ||
gcov --version | ||
# Compile cfitsio from source to get its static library. | ||
curl https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.3.0.tar.gz -O | ||
tar -xvf cfitsio-4.3.0.tar.gz && cd cfitsio-4.3.0 | ||
CFLAGS="-fPIE -O3 -march=x86-64-v2" ./configure --enable-reentrant --disable-curl --enable-sse2 --enable-ssse3 --libdir=/usr/lib/x86_64-linux-gnu/ | ||
sudo make -j install | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
|
||
- name: Install CUDA | ||
uses: Jimver/[email protected].5 | ||
uses: Jimver/[email protected].11 | ||
with: | ||
cuda: '11.2.0' | ||
cuda: '12.2.0' | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
|
@@ -55,25 +80,41 @@ jobs: | |
curl https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/License.txt -o LICENSE-cfitsio | ||
cp .github/workflows/releases-readme.md README.md | ||
cargo build --profile production --locked --no-default-features --features=hdf5-static,cfitsio-static | ||
mv target/production/hyperdrive . | ||
tar -acvf mwa_hyperdrive-$(git describe --tags)-Linux-x86-64-v3.tar.gz \ | ||
LICENSE COPYING-hdf5 LICENSE-erfa LICENSE-cfitsio README.md \ | ||
hyperdrive | ||
cargo build --profile production --locked --no-default-features --features=hdf5-static,cfitsio-static,cuda | ||
mv target/production/hyperdrive . | ||
tar -acvf mwa_hyperdrive-$(git describe --tags)-Linux-x86-64-v3-CUDA-double.tar.gz \ | ||
LICENSE COPYING-hdf5 LICENSE-erfa LICENSE-cfitsio LICENSE-NVIDIA README.md \ | ||
hyperdrive | ||
cargo build --profile production --locked --no-default-features --features=hdf5-static,cfitsio-static,cuda,gpu-single | ||
mv target/production/hyperdrive . | ||
tar -acvf mwa_hyperdrive-$(git describe --tags)-Linux-x86-64-v3-CUDA-single.tar.gz \ | ||
LICENSE COPYING-hdf5 LICENSE-erfa LICENSE-cfitsio LICENSE-NVIDIA README.md \ | ||
hyperdrive | ||
env: | ||
RUSTFLAGS: "-C target-cpu=x86-64-v3" | ||
# Build with our recently-built static cfitsio | ||
export CFITSIO_STATIC=1 | ||
# Don't build against the host CPU | ||
rm .cargo/config.toml | ||
# Don't make it look like the git tree is dirty because we aren't | ||
# building against the host CPU | ||
perl -0777 -pe 's/let dirty = .*\n.*\n.*\n.*/let dirty = "";/' src/cli/mod.rs | ||
for ARCH in {2,3}; do | ||
echo "Building x86-64-v${ARCH}" | ||
export CFLAGS="-march=x86-64-v${ARCH}" | ||
export CXXFLAGS="-march=x86-64-v${ARCH}" | ||
export RUSTFLAGS="-C target-cpu=x86-64-v${ARCH}" | ||
# Use --no-default-features to disable plotting; it's too hard to make this portable. | ||
cargo build --profile production --locked --no-default-features --features=hdf5-static | ||
mv target/production/hyperdrive . | ||
tar -acvf mwa_hyperdrive-$(git describe --tags)-Linux-x86-64-v${ARCH}.tar.gz \ | ||
LICENSE COPYING-hdf5 LICENSE-erfa LICENSE-cfitsio README.md \ | ||
hyperdrive | ||
cargo build --profile production --locked --no-default-features --features=hdf5-static,cuda | ||
mv target/production/hyperdrive . | ||
tar -acvf mwa_hyperdrive-$(git describe --tags)-Linux-x86-64-v${ARCH}-CUDA-double.tar.gz \ | ||
LICENSE COPYING-hdf5 LICENSE-erfa LICENSE-cfitsio LICENSE-NVIDIA README.md \ | ||
hyperdrive | ||
cargo build --profile production --locked --no-default-features --features=hdf5-static,cuda,gpu-single | ||
mv target/production/hyperdrive . | ||
tar -acvf mwa_hyperdrive-$(git describe --tags)-Linux-x86-64-v${ARCH}-CUDA-single.tar.gz \ | ||
LICENSE COPYING-hdf5 LICENSE-erfa LICENSE-cfitsio LICENSE-NVIDIA README.md \ | ||
hyperdrive | ||
cargo clean | ||
done | ||
- name: Upload tarball | ||
uses: actions/upload-artifact@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,17 +10,21 @@ on: | |
branches: | ||
- '**' | ||
|
||
# The CI jobs can use a lot of disk space; we take tips from this site to run | ||
# the jobs faster and use less space. | ||
# https://matklad.github.io/2021/09/04/fast-rust-builds.html | ||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: 0 | ||
RUSTFLAGS: "-C debuginfo=0 --deny warnings" | ||
MWA_BEAM_FILE: /mwa_full_embedded_element_pattern.h5 | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
|
@@ -44,9 +48,9 @@ jobs: | |
DEBIAN_FRONTEND: noninteractive | ||
|
||
- name: Install CUDA | ||
uses: Jimver/[email protected].5 | ||
uses: Jimver/[email protected].11 | ||
with: | ||
cuda: '11.5.1' | ||
cuda: '12.2.0' | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
|
@@ -58,29 +62,32 @@ jobs: | |
- name: Get the beam HDF5 file | ||
run: sudo curl http://ws.mwatelescope.org/static/mwa_full_embedded_element_pattern.h5 -o $MWA_BEAM_FILE | ||
|
||
# Test that building works. Build statically first so less compiling is | ||
# needed when running tests. | ||
- name: Debug build with static features | ||
# Test that building works before running tests. Build statically first so | ||
# less compiling is needed when running tests. | ||
- name: Build with static features | ||
run: cargo test --locked --release --features=cuda,all-static --no-run | ||
|
||
- name: Debug build | ||
# Can't test with CUDA, no GPUs available in CI | ||
- name: Build | ||
run: cargo test --locked --release --features=cuda --no-run | ||
|
||
# Can't test with CUDA, no GPUs available in CI | ||
- name: Run tests | ||
run: cargo test --locked --release | ||
|
||
- name: Run ignored tests | ||
run: cargo test --locked --release -- --ignored | ||
run: | | ||
# It seems that we use up a lot of space by this point. | ||
cargo clean | ||
cargo test --locked --release -- --ignored | ||
- name: Minimum-specified Rust version works | ||
run: | | ||
MIN_RUST=$(grep -m1 "rust-version" Cargo.toml | sed 's|.*\"\(.*\)\"|\1|') | ||
~/.cargo/bin/rustup install $MIN_RUST --profile minimal | ||
cargo clean | ||
cargo +${MIN_RUST} test --locked | ||
cargo +${MIN_RUST} test --locked --features=all-static | ||
# Can't test with --all-features, cuda and hip aren't allowed together | ||
# hip is also difficult to install so ignore it | ||
cargo +${MIN_RUST} test --locked --features=all-static,cuda --no-run | ||
cargo +${MIN_RUST} test --locked --features=all-static,cuda,gpu-single --no-run | ||
cargo +${MIN_RUST} test --locked --release | ||
cargo +${MIN_RUST} test --locked --release --features=all-static | ||
# Can't test with --all-features because cuda and hip aren't allowed | ||
# together. hip is also difficult to install so ignore it. | ||
cargo +${MIN_RUST} test --locked --release --features=all-static,cuda --no-run | ||
cargo +${MIN_RUST} test --locked --release --features=all-static,cuda,gpu-single --no-run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[package] | ||
name = "mwa_hyperdrive" | ||
version = "0.2.1" | ||
version = "0.3.0" | ||
authors = [ | ||
"Christopher H. Jordan <[email protected]>", | ||
"Dev Null <[email protected]>", | ||
] | ||
edition = "2021" | ||
rust-version = "1.65" | ||
rust-version = "1.68" | ||
license = "MPL-2.0" | ||
readme = "README.md" | ||
description = "Calibration software for the Murchison Widefield Array (MWA) radio telescope" | ||
|