Skip to content

Update asdfspline submodule #219

Update asdfspline submodule

Update asdfspline submodule #219

Workflow file for this run

name: Build ASDF lib and run tests
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUST_LOG: info
jobs:
Linux:
runs-on: ubuntu-latest
steps:
- name: Clone Git repository
uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Cache Cargo-installed binaries
uses: actions/cache@v3
id: cache-cargo
with:
path: ~/cargo-bin
# Increment to force re-installation:
key: ${{ runner.os }}-cache01
- name: Install cargo-c
if: steps.cache-cargo.outputs.cache-hit != 'true'
run: |
cargo install cargo-c
mkdir -p ~/cargo-bin
cp ~/.cargo/bin/cargo-capi ~/cargo-bin
cp ~/.cargo/bin/cargo-cbuild ~/cargo-bin
cp ~/.cargo/bin/cargo-cinstall ~/cargo-bin
cp ~/.cargo/bin/cargo-ctest ~/cargo-bin
- name: Add cache directory to path
run: |
echo "$HOME/cargo-bin" >> $GITHUB_PATH
- name: Run tests
run: |
cargo test --workspace --all-features
- name: Install C API
run: |
cargo cinstall --verbose --destdir=temp
sudo cp -r temp/usr/local/* /usr/local/
- name: Update linker path
run: |
sudo ldconfig
- name: Install Pure Data
run: |
sudo apt-get install --no-install-recommends puredata-dev
- name: Build Pure Data external
working-directory: pure-data
run: |
make
make install DESTDIR="$(pwd)" pkglibdir=/pkglibdir
- name: Fix dependencies
working-directory: pure-data
run: |
sh pd-lib-builder-iem-ci/localdeps/localdeps.linux.sh pkglibdir/asdf/asdf~.pd_linux
- name: Upload Pd external
uses: actions/upload-artifact@v3
with:
name: Linux Pd external
path: pure-data/pkglibdir/asdf/*
macOS:
runs-on: macos-latest
steps:
- name: Clone Git repository
uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Cache Cargo-installed binaries
uses: actions/cache@v3
id: cache-cargo
with:
path: ~/cargo-bin
# Increment to force re-installation:
key: ${{ runner.os }}-cache01
- name: Install cargo-c
if: steps.cache-cargo.outputs.cache-hit != 'true'
run: |
cargo install cargo-c
mkdir -p ~/cargo-bin
cp ~/.cargo/bin/cargo-capi ~/cargo-bin
cp ~/.cargo/bin/cargo-cbuild ~/cargo-bin
cp ~/.cargo/bin/cargo-cinstall ~/cargo-bin
cp ~/.cargo/bin/cargo-ctest ~/cargo-bin
- name: Add cache directory to path
run: |
echo "$HOME/cargo-bin" >> $GITHUB_PATH
- name: Run tests
run: |
cargo test --workspace --all-features
- name: Install C API
run: |
cargo cinstall --verbose --destdir=temp
sudo cp -r temp/usr/local/* /usr/local/
- name: Install Pure Data
run: |
brew install --cask pd
PD_APP=$(ls -d /Applications/Pd-*.app)
echo "PDINCLUDEDIR=$PD_APP/Contents/Resources/src" >> $GITHUB_ENV
- name: Build Pure Data external
working-directory: pure-data
run: |
make
make install DESTDIR="$(pwd)" pkglibdir=/pkglibdir
- name: Fix dependencies
working-directory: pure-data
run: |
sh pd-lib-builder-iem-ci/localdeps/localdeps.macos.sh pkglibdir/asdf/asdf~.pd_darwin
- name: Upload Pd external
uses: actions/upload-artifact@v3
with:
name: macOS Pd external
path: pure-data/pkglibdir/asdf/*
Windows-MSYS2:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
make
unzip
mingw-w64-x86_64-cmake
mingw-w64-x86_64-rust
mingw-w64-x86_64-cargo-c
mingw-w64-x86_64-ntldd-git
- name: Clone Git repository
uses: actions/checkout@v3
with:
submodules: true
- name: Run tests
run: |
cargo test --workspace --all-features
- name: Install ASDF
run: |
cargo cinstall --verbose --prefix=/mingw64
- name: Install Pure Data
run: |
wget -q -O Pd.zip http://msp.ucsd.edu/Software/pd-0.51-3.msw.zip
rm -rf "${PROGRAMFILES}/pd" && mkdir -p "${PROGRAMFILES}/pd"
unzip -q Pd.zip -d "${PROGRAMFILES}/pd"
mv -v "${PROGRAMFILES}/pd"/*/* "${PROGRAMFILES}/pd"
rm -f Pd.zip
export PD="${PROGRAMFILES}/pd/bin/pd.com"
- name: Build Pure Data external
working-directory: pure-data
run: |
make
make install DESTDIR="$(pwd)" pkglibdir=/pkglibdir
- name: Fix dll dependencies
working-directory: pure-data
run: |
sh pd-lib-builder-iem-ci/localdeps/localdeps.win.sh pkglibdir/asdf/asdf~.dll
- name: Upload Pd external
uses: actions/upload-artifact@v3
with:
name: Windows Pd external
path: pure-data/pkglibdir/asdf/*
Windows-MSVC:
runs-on: windows-latest
steps:
- name: Clone Git repository
uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable-msvc
- name: Cache Cargo-installed binaries
uses: actions/cache@v3
id: cache-cargo
with:
path: ~/cargo-bin
# Increment to force re-installation:
key: ${{ runner.os }}-cache01
- name: Install cargo-c
if: steps.cache-cargo.outputs.cache-hit != 'true'
run: |
cargo install cargo-c
mkdir -p ~/cargo-bin
cp ~/.cargo/bin/cargo-capi.exe ~/cargo-bin
cp ~/.cargo/bin/cargo-cbuild.exe ~/cargo-bin
cp ~/.cargo/bin/cargo-cinstall.exe ~/cargo-bin
cp ~/.cargo/bin/cargo-ctest.exe ~/cargo-bin
- name: Add cache directory to path
run: |
echo "$HOME\cargo-bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Run tests
run: |
cargo test --workspace --all-features
- name: Install C API
run: |
cargo cinstall --verbose
deken-package:
# The deken package seems to be missing on 22.04:
runs-on: ubuntu-20.04
needs: [Linux, macOS, Windows-MSYS2]
steps:
- name: Clone Git repository
uses: actions/checkout@v3
- name: Retrieve Linux external
uses: actions/download-artifact@v3
with:
name: Linux Pd external
path: asdf
- name: Retrieve macOS external
uses: actions/download-artifact@v3
with:
name: macOS Pd external
path: asdf
- name: Retrieve Windows external
uses: actions/download-artifact@v3
with:
name: Windows Pd external
path: asdf
- name: Copy help patch and source file
run: |
cp pure-data/asdf~* asdf
- name: Install deken
run: |
sudo apt-get install --no-install-recommends deken
# work-arounds from https://github.com/pure-data/deken/issues/247:
mkdir ~/.deken
python3 -m pip install hy==0.19
- name: Run deken
run: |
deken package -v $(git describe --tags --always) --objects pure-data/objects.txt asdf
- name: Upload deken package
uses: actions/upload-artifact@v3
with:
name: Deken package
path: "*.dek*"
check-code:
runs-on: ubuntu-latest
steps:
- name: Clone Git repository
uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy
- name: rustfmt
run: |
cargo fmt --all --check
- name: clippy
run: |
cargo clippy --all-targets --all-features -- -D warnings
- name: Build docs
run: |
cargo rustdoc --all-features -- -D warnings
msrv:
strategy:
matrix:
rust-version: ["1.65.0"]
runs-on: ubuntu-latest
steps:
- name: Clone Git repository
uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust version ${{ matrix.rust-version }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust-version }}
- name: Check whether it compiles
run: |
cargo check --all-features --verbose