wip: rebase verification #59
Workflow file for this 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
on: [push, pull_request] | |
name: build-test-release | |
jobs: | |
publish: | |
name: Publish for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, ubuntu-latest] | |
include: | |
- os: ubuntu-20.04 | |
artifact_name: libmatrix.so | |
asset_name: libmatrix.so-ubuntu-20.04 | |
- os: ubuntu-22.04 | |
artifact_name: libmatrix.so | |
asset_name: libmatrix.so-ubuntu-22.04 | |
- os: ubuntu-latest # currently 24.04 | |
artifact_name: libmatrix.so | |
asset_name: libmatrix.so-ubuntu-latest | |
rust: | |
- stable | |
fail-fast: false | |
steps: | |
- name: Install latest-stable weechat for Ubuntu | |
id: build_env | |
run: | | |
sudo apt update | |
sudo apt install dirmngr gpg-agent apt-transport-https | |
sudo apt-key adv --keyserver hkps://keys.openpgp.org --recv-keys 11E9DE8848F2B65222AA75B8D1820DB22A11534E | |
echo "deb https://weechat.org/ubuntu $(lsb_release -c | awk '{ print $NF }') main" | sudo tee /etc/apt/sources.list.d/weechat.list | |
echo "deb-src https://weechat.org/ubuntu $(lsb_release -c | awk '{ print $NF }') main" | sudo tee -a /etc/apt/sources.list.d/weechat.list | |
sudo apt update | |
sudo apt install weechat-curses weechat-plugins weechat-python weechat-perl weechat-dev | |
echo "version of weechat-plugin.h that weechat-sys uses by default:" | |
grep -m 1 -n -H "WEECHAT_PLUGIN_API_VERSION" "/usr/include/weechat/weechat-plugin.h" | |
v="$(grep -m 1 -o 'WEECHAT_PLUGIN_API_VERSION.*' '/usr/include/weechat/weechat-plugin.h')" | |
echo "W_API_V=$v" >> $GITHUB_OUTPUT | |
- name: Install sqlite3 libraries | |
run: | | |
sudo apt install libsqlite3-dev | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install toolchain | |
run: | | |
rustup update --no-self-update | |
rustup default stable | |
- name: Run cargo build | |
run: cargo build --release | |
- name: Run cargo test | |
run: cargo test --release | |
- name: Upload binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: 'libmatrix.so-${{ matrix.os }}' | |
path: target/release/libmatrix.so |