Bump actions/checkout from 4 to 5 #256
Workflow file for this run
This file contains hidden or 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
| name: Build ASDF lib and run tests | |
| on: [push, pull_request] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| RUST_LOG: info | |
| # https://github.com/Prior99/libsamplerate-sys/issues/21: | |
| CMAKE_POLICY_VERSION_MINIMUM: 3.5 | |
| jobs: | |
| Linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone Git repository | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - name: Cache Cargo-installed binaries | |
| uses: actions/cache@v4 | |
| 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@v4 | |
| with: | |
| name: Linux Pd external | |
| path: pure-data/pkglibdir/asdf/* | |
| macOS: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Clone Git repository | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - name: Cache Cargo-installed binaries | |
| uses: actions/cache@v4 | |
| 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@v4 | |
| 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: | |
| msystem: ucrt64 | |
| update: true | |
| install: >- | |
| make | |
| unzip | |
| pacboy: >- | |
| cmake:p | |
| rust:p | |
| cargo-c:p | |
| ntldd-git:p | |
| - name: Clone Git repository | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Run tests | |
| run: | | |
| cargo test --workspace --all-features | |
| - name: Install ASDF | |
| run: | | |
| cargo cinstall --verbose --prefix=${MINGW_PREFIX} | |
| - 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@v4 | |
| with: | |
| name: Windows Pd external | |
| path: pure-data/pkglibdir/asdf/* | |
| Windows-MSVC: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Clone Git repository | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable-msvc | |
| - name: Cache Cargo-installed binaries | |
| uses: actions/cache@v4 | |
| 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: | |
| runs-on: ubuntu-latest | |
| container: registry.git.iem.at/pd/deken | |
| needs: [Linux, macOS, Windows-MSYS2] | |
| steps: | |
| - name: Install Git | |
| run: | | |
| apt-get update | |
| apt-get install --assume-yes --no-install-recommends git | |
| - name: Clone Git repository | |
| uses: actions/checkout@v5 | |
| with: | |
| # check out all tags to get proper version in Deken package | |
| fetch-depth: 0 | |
| - name: git clone fix | |
| # https://github.com/actions/checkout/issues/1169: | |
| run: git config --system --add safe.directory $GITHUB_WORKSPACE | |
| - name: Retrieve Linux external | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: Linux Pd external | |
| path: asdf | |
| - name: Retrieve macOS external | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: macOS Pd external | |
| path: asdf | |
| - name: Retrieve Windows external | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: Windows Pd external | |
| path: asdf | |
| - name: Copy help patch and source file | |
| run: | | |
| cp pure-data/asdf~* asdf | |
| - 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@v4 | |
| with: | |
| name: Deken package | |
| path: "*.dek*" | |
| check-code: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone Git repository | |
| uses: actions/checkout@v5 | |
| 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@v5 | |
| 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 |