Skip to content

Commit

Permalink
Merge pull request #19 from MWATelescope/allow_resubmit_option
Browse files Browse the repository at this point in the history
Allow resubmit option
  • Loading branch information
gsleap authored May 13, 2024
2 parents 52e0ecb + 20d908a commit f3fcbd5
Show file tree
Hide file tree
Showing 13 changed files with 692 additions and 499 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ cp .github/workflows/releases-readme.md README.md

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
source /root/.cargo/env
# 1.63 is the newest rustc version that can use glibc >= 2.11, and we use it
# because newer versions require glibc >= 2.17 (which this container
# deliberately doesn't have; we want maximum compatibility, so we use an old
# glibc).
rustup install 1.63 --no-self-update
rustup default 1.63

rustup install 1.70 --no-self-update
rustup default 1.70

# Build a release for each x86_64 microarchitecture level. v4 can't be
# compiled on GitHub for some reason.
Expand All @@ -32,6 +29,8 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
cargo build --release

mv target/release/giant-squid .
tar -acvf giant-squid-$(git describe --tags)-MacOSX.tar.gz \
LICENSE README.md giant-squid

# HOSTYPE should by x86_64 or arm64
tar -acvf giant-squid-$(git describe --tags)-MacOS-${HOSTTYPE}.tar.gz \
LICENSE README.md giant-squid
fi
24 changes: 15 additions & 9 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md

# Do this on every push, but don't double up on tags
on:
push:
tags-ignore:
Expand All @@ -16,21 +13,30 @@ name: Generate Coverage report

jobs:
coverage:
runs-on: ubuntu-latest
container: mwatelescope/giant-squid:latest
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Rust, stable minimal toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: llvm-tools

- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov

- name: Generate test lcov coverage into coverage/ dir
run: |
mkdir -p coverage
/opt/cargo/bin/cargo llvm-cov --all --lcov --output-path coverage/coverage.lcov
cargo llvm-cov clean --workspace
cargo llvm-cov --all --lcov --output-path coverage/coverage.lcov
# this uses the result of the previous run to generate a text summary
/opt/cargo/bin/cargo llvm-cov --no-run
cargo llvm-cov report
- name: Upload reports to codecov.io
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
62 changes: 45 additions & 17 deletions .github/workflows/releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -34,47 +34,75 @@ jobs:
path: "*.tar.gz"
if-no-files-found: error

build-macos-release:
name: Build release for MacOS
runs-on: macos-latest
build-macos-13-release:
name: Build release for MacOS x86_64
runs-on: macos-13

steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
- name: Install Rust, minimal toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: 1.70

- name: Build
run: .github/workflows/build.sh

- name: Upload tarball
uses: actions/upload-artifact@v4
with:
profile: minimal
toolchain: stable
override: true
name: macos13.tar.gz
path: "*.tar.gz"
if-no-files-found: error

build-macos-14-release:
name: Build release for MacOS arm64
runs-on: macos-14

steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Rust, minimal toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: 1.70

- name: Build
run: .github/workflows/build.sh

- name: Upload tarball
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: macos.tar.gz
name: macos14.tar.gz
path: "*.tar.gz"
if-no-files-found: error

create-release:
name: Create a new release
runs-on: ubuntu-latest
needs: [build-linux-release, build-macos-release]
needs: [build-linux-release, build-macos-13-release, build-macos-14-release]
steps:
- name: Download Linux artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: linux.tar.gz

- name: Download MacOS artifact
uses: actions/download-artifact@v2
- name: Download MacOS 13 x86_64 artifact
uses: actions/download-artifact@v4
with:
name: macos13.tar.gz

- name: Download MacOS 14 arm64 artifact
uses: actions/download-artifact@v4
with:
name: macos.tar.gz
name: macos14.tar.gz

- name: Provide new release asset
uses: "marvinpinto/action-automatic-releases@latest"
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macOS-13, macOS-14]
toolchain: [stable]
include:
- os: ubuntu-latest
toolchain: "msrv"
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -37,15 +37,10 @@ jobs:
run:
echo "MSRV=$(grep -m1 'rust-version' Cargo.toml | sed 's|.*\"\(.*\)\"|\1|')" >> "$GITHUB_ENV"

- name: Install toolchain ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain == 'msrv' && env.MSRV || matrix.toolchain }}
override: true

- name: Run tests (no default feautures)
run: cargo test --no-default-features --locked

- name: Install Rust minimal toolchain ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain == 'msrv' && env.MSRV || matrix.toolchain }}

- name: Run tests
run: cargo test --locked
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).

## 1.0.0 - 2024-05-13

* Increased MSRV to 1.70
* Added new command line option `--allow-resubmit` for `submit-vis` `submit-conv` `submit-meta` 'submit-volt`. When present, allow a new job to be submitted which has the same parameters as an existing job that is in your queue. Default is to not allow resubmit.
* Updated releases to include MacOS 14 (arm64) in addition to MacOS 13 (x86_64) and Linux x86_64.
* Fixed clippy lints.

## 0.8.0 - 2023-11-22

* supports specifying the MWA ASVO webserver address via environment variable `MWA_ASVO_HOST` (default is asvo.mwatelescope.org)
Expand Down
Loading

0 comments on commit f3fcbd5

Please sign in to comment.