Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
fsimonis committed Feb 2, 2024
1 parent c6e95bb commit 555360f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: apt-get -yy install cargo
- name: Install preCICE
run: |
wget -q -O libprecice.deb https://github.com/precice/precice/releases/download/v2.5.0/libprecice2_2.5.0_$(lsb_release -sc).deb
wget -q -O libprecice.deb https://github.com/precice/precice/releases/download/v3.0.0/libprecice3_3.0.0_$(lsb_release -sc).deb
apt-get -yy install ./libprecice.deb
rm libprecice.deb
- uses: actions/checkout@v3
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,30 @@ jobs:
runs-on: ubuntu-latest
container: 'precice/ci-ubuntu-2204:latest'
steps:
- name: Get verison from tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true
- name: Install common dependencies
run: |
apt-get -yy update
apt-get -yy upgrade
apt-get -yy install cargo
- name: Install preCICE
run: |
wget -q -O libprecice.deb https://github.com/precice/precice/releases/download/v2.5.0/libprecice2_2.5.0_jammy.deb
# 2.5.4 -> 2.5.0 (always picks minor version 0 of precice)
export preciceVersion="$( echo '${{ steps.tag.outputs.tag }}' | sed 's/^\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1.0/' )"
# 2.5.0 -> libprecice2_2.5.0_codename.deb
export debPackage="$( echo $preciceVersion | sed 's/^\([0-9]\+\)\.\([0-9]\+\.[0-9]\+\)/libprecice\1_\1.\2/' )_$(lsb_release -sc).deb"
wget -q -O libprecice.deb https://github.com/precice/precice/releases/download/v${preciceVersion}/${debPackage}
apt-get -yy install ./libprecice.deb
rm libprecice.deb
- uses: actions/checkout@v3
- name: Try to build first
run: cargo build
run: cargo build --release
- name: Try to build examples
run: cargo build --release --examples
- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Expand Down

0 comments on commit 555360f

Please sign in to comment.