fork/livesplit-core
git clone https://git.julia.blue/fork/livesplit-core
ebde0dc
master
1name : Build 2 3on : 4pull_request : 5push : 6branches : 7- 'master' 8tags : 9- '*' 10 11env : 12CARGO_TERM_COLOR : always 13 14jobs : 15build : 16runs-on : ${{ matrix.os }} 17strategy : 18fail-fast : false 19matrix : 20label : 21# Bare Metal 22- Bare Metal Nvidia PTX 64 23- Bare Metal ARM Cortex-M thumbv6m 24- Bare Metal ARM Cortex-M thumbv7em 25- Bare Metal ARM Cortex-M thumbv7em Hardware Float 26- Bare Metal ARM Cortex-M thumbv7m 27- Bare Metal ARM Cortex-M thumbv8m.base 28- Bare Metal ARM Cortex-M thumbv8m.main 29- Bare Metal ARM Cortex-M thumbv8m.main Hardware Float 30# FIXME: RISC-V without atomics doesn't work with ahash 31# - Bare Metal RISC-V 32 i 32# - Bare Metal RISC-V 32 imc 33- Bare Metal RISC-V 32 imac 34- Bare Metal RISC-V 64 gc 35- Bare Metal RISC-V 64 imac 36 37# WebAssembly 38- WebAssembly Unknown 39- WebAssembly Web 40- WebAssembly WASI 41 42# Windows 43- Windows aarch64 44# FIXME: The `windows` crate doesn't compile on this target. 45# - Windows i586 46- Windows i686 47- Windows x86_64 48- Windows i686 gnu 49- Windows x86_64 gnu 50 51# Linux 52- Linux i586 53- Linux i586 musl 54- Linux i686 55- Linux i686 musl 56- Linux x86_64 57- Linux x86_64 musl 58- Linux x86_64 gnux32 59- Linux arm 60- Linux arm musl 61- Linux arm Hardware Float 62- Linux arm musl Hardware Float 63- Linux armv5te 64- Linux armv5te musl 65- Linux armv7 Hardware Float 66- Linux armv7 musl Hardware Float 67- Linux aarch64 68- Linux mips 69- Linux mips64 70- Linux mips64el 71- Linux mipsel 72- Linux mipsel musl 73# Unstable 74# - env: TARGET=mipsisa32r6-unknown-linux-gnu 75# - env: TARGET=mipsisa32r6el-unknown-linux-gnu 76# - env: TARGET=mipsisa64r6-unknown-linux-gnuabi64 77# - env: TARGET=mipsisa64r6el-unknown-linux-gnuabi64 78- Linux powerpc 79- Linux powerpc64le 80- Linux s390x 81# These got removed from cross, because they kept breaking: 82# https://github.com/rust-embedded/cross/pull/440 83# - Linux powerpc64 84# - Linux sparc64 85 86# macOS 87- macOS aarch64 88- macOS x86_64 89 90# iOS 91- iOS aarch64 92- iOS x86_64 93 94# Android 95- Android i686 96- Android x86_64 97- Android arm 98- Android armv7 99- Android aarch64 100 101# *BSD 102# - i686-unknown-freebsd DISABLE_TESTS=1 103# - x86_64-unknown-freebsd DISABLE_TESTS=1 104- NetBSD x86_64 105 106# Solaris 107# - Solaris x86_64 108# weird error 109# https://travis-ci.org/LiveSplit/livesplit-core/jobs/327011754 110# - env: TARGET=sparcv9-sun-solaris 111 112# Testing other channels 113- Windows Beta 114- Windows Nightly 115- Windows Beta gnu 116- Windows Nightly gnu 117- Linux Beta 118- Linux Nightly 119- macOS Beta 120- macOS Nightly 121 122include : 123# Bare Metal 124- label : Bare Metal Nvidia PTX 64 125target : nvptx64-nvidia-cuda 126os : ubuntu-latest 127toolchain : stable 128tests : skip 129dylib : skip 130release : skip 131no_std : true 132install_target : true 133 134- label : Bare Metal ARM Cortex-M thumbv6m 135target : thumbv6m-none-eabi 136os : ubuntu-latest 137toolchain : stable 138tests : skip 139dylib : skip 140release : skip 141no_std : true 142install_target : true 143 144- label : Bare Metal ARM Cortex-M thumbv7em 145target : thumbv7em-none-eabi 146os : ubuntu-latest 147toolchain : stable 148tests : skip 149dylib : skip 150release : skip 151no_std : true 152install_target : true 153 154- label : Bare Metal ARM Cortex-M thumbv7em Hardware Float 155target : thumbv7em-none-eabihf 156os : ubuntu-latest 157toolchain : stable 158tests : skip 159dylib : skip 160release : skip 161no_std : true 162install_target : true 163 164- label : Bare Metal ARM Cortex-M thumbv7m 165target : thumbv7m-none-eabi 166os : ubuntu-latest 167toolchain : stable 168tests : skip 169dylib : skip 170release : skip 171no_std : true 172install_target : true 173 174- label : Bare Metal ARM Cortex-M thumbv8m.base 175target : thumbv8m.base-none-eabi 176os : ubuntu-latest 177toolchain : stable 178tests : skip 179dylib : skip 180release : skip 181no_std : true 182install_target : true 183 184- label : Bare Metal ARM Cortex-M thumbv8m.main 185target : thumbv8m.main-none-eabi 186os : ubuntu-latest 187toolchain : stable 188tests : skip 189dylib : skip 190release : skip 191no_std : true 192install_target : true 193 194- label : Bare Metal ARM Cortex-M thumbv8m.main Hardware Float 195target : thumbv8m.main-none-eabihf 196os : ubuntu-latest 197toolchain : stable 198tests : skip 199dylib : skip 200release : skip 201no_std : true 202install_target : true 203 204# - label: Bare Metal RISC-V 32 i 205# target: riscv32i-unknown-none-elf 206# os: ubuntu-latest 207# toolchain: stable 208# tests: skip 209# dylib: skip 210# release: skip 211# no_std: true 212# install_target: true 213 214# - label: Bare Metal RISC-V 32 imc 215# target: riscv32imc-unknown-none-elf 216# os: ubuntu-latest 217# toolchain: stable 218# tests: skip 219# dylib: skip 220# release: skip 221# no_std: true 222# install_target: true 223 224- label : Bare Metal RISC-V 32 imac 225target : riscv32imac-unknown-none-elf 226os : ubuntu-latest 227toolchain : stable 228tests : skip 229dylib : skip 230release : skip 231no_std : true 232install_target : true 233 234- label : Bare Metal RISC-V 64 gc 235target : riscv64gc-unknown-none-elf 236os : ubuntu-latest 237toolchain : stable 238tests : skip 239dylib : skip 240release : skip 241no_std : true 242install_target : true 243 244- label : Bare Metal RISC-V 64 imac 245target : riscv64imac-unknown-none-elf 246os : ubuntu-latest 247toolchain : stable 248tests : skip 249dylib : skip 250release : skip 251no_std : true 252install_target : true 253 254# WebAssembly 255- label : WebAssembly Unknown 256target : wasm32-unknown-unknown 257os : ubuntu-latest 258cross : skip 259tests : skip 260dylib : skip 261install_target : true 262 263- label : WebAssembly Web 264target : wasm32-unknown-unknown 265os : ubuntu-latest 266cross : skip 267tests : skip 268dylib : skip 269install_target : true 270features : "--features wasm-web" 271 272- label : WebAssembly WASI 273target : wasm32-wasi 274os : ubuntu-latest 275cross : skip 276dylib : skip 277install_target : true 278 279# Windows 280- label : Windows aarch64 281target : aarch64-pc-windows-msvc 282os : windows-latest 283cross : skip 284tests : skip 285install_target : true 286 287# - label: Windows i586 288# target: i586-pc-windows-msvc 289# os: windows-latest 290# cross: skip 291# auto_splitting: skip 292# install_target: true 293 294- label : Windows i686 295target : i686-pc-windows-msvc 296os : windows-latest 297cross : skip 298auto_splitting : skip 299install_target : true 300 301- label : Windows x86_64 302target : x86_64-pc-windows-msvc 303os : windows-latest 304cross : skip 305 306- label : Windows i686 gnu 307target : i686-pc-windows-gnu 308toolchain : stable-i686-pc-windows-gnu 309os : windows-latest 310cross : skip 311auto_splitting : skip 312networking : skip 313# Networking fails due to some linking error regarding -lntdll 314install_target : true 315 316- label : Windows x86_64 gnu 317target : x86_64-pc-windows-gnu 318toolchain : stable-x86_64-pc-windows-gnu 319os : windows-latest 320cross : skip 321install_target : true 322 323# Linux 324- label : Linux i586 325target : i586-unknown-linux-gnu 326os : ubuntu-latest 327auto_splitting : skip 328 329- label : Linux i586 musl 330target : i586-unknown-linux-musl 331os : ubuntu-latest 332tests : skip 333dylib : skip 334 335- label : Linux i686 336target : i686-unknown-linux-gnu 337os : ubuntu-latest 338auto_splitting : skip 339 340- label : Linux i686 musl 341target : i686-unknown-linux-musl 342os : ubuntu-latest 343auto_splitting : skip 344dylib : skip 345 346- label : Linux x86_64 347target : x86_64-unknown-linux-gnu 348os : ubuntu-latest 349 350- label : Linux x86_64 musl 351target : x86_64-unknown-linux-musl 352os : ubuntu-latest 353dylib : skip 354 355- label : Linux x86_64 gnux32 356target : x86_64-unknown-linux-gnux32 357os : ubuntu-latest 358cross : skip 359install_target : true 360tests : skip 361dylib : skip 362 363- label : Linux arm 364target : arm-unknown-linux-gnueabi 365os : ubuntu-latest 366tests : skip 367 368- label : Linux arm musl 369target : arm-unknown-linux-musleabi 370os : ubuntu-latest 371tests : skip 372dylib : skip 373 374- label : Linux arm Hardware Float 375target : arm-unknown-linux-gnueabihf 376os : ubuntu-latest 377tests : skip 378dylib : skip 379 380- label : Linux arm musl Hardware Float 381target : arm-unknown-linux-musleabihf 382os : ubuntu-latest 383tests : skip 384dylib : skip 385 386- label : Linux armv5te 387target : armv5te-unknown-linux-gnueabi 388os : ubuntu-latest 389tests : skip 390dylib : skip 391 392- label : Linux armv5te musl 393target : armv5te-unknown-linux-musleabi 394os : ubuntu-latest 395tests : skip 396dylib : skip 397 398- label : Linux armv7 Hardware Float 399target : armv7-unknown-linux-gnueabihf 400os : ubuntu-latest 401auto_splitting : skip 402 403- label : Linux armv7 musl Hardware Float 404target : armv7-unknown-linux-musleabihf 405os : ubuntu-latest 406tests : skip 407dylib : skip 408 409- label : Linux aarch64 410target : aarch64-unknown-linux-gnu 411os : ubuntu-latest 412 413- label : Linux mips 414target : mips-unknown-linux-gnu 415os : ubuntu-latest 416auto_splitting : skip 417networking : skip 418# FIXME: Networking Tests fail due to missing OpenSSL 419# https://github.com/LiveSplit/livesplit-core/issues/308 420software_rendering : skip 421# TODO: The software rendering is apparently not working on big 422# endian platforms. Almost definitely caused by tiny-skia. This may 423# or may not be intentional. 424 425- label : Linux mips64 426target : mips64-unknown-linux-gnuabi64 427os : ubuntu-latest 428auto_splitting : skip 429networking : skip 430# FIXME: Networking Tests fail due to missing OpenSSL 431# https://github.com/LiveSplit/livesplit-core/issues/308 432software_rendering : skip 433# TODO: The software rendering is apparently not working on big 434# endian platforms. Almost definitely caused by tiny-skia. This may 435# or may not be intentional. 436 437- label : Linux mips64el 438target : mips64el-unknown-linux-gnuabi64 439os : ubuntu-latest 440auto_splitting : skip 441networking : skip 442# FIXME: Networking Tests fail due to missing OpenSSL 443# https://github.com/LiveSplit/livesplit-core/issues/308 444 445- label : Linux mipsel 446target : mipsel-unknown-linux-gnu 447os : ubuntu-latest 448auto_splitting : skip 449networking : skip 450# FIXME: Networking Tests fail due to missing OpenSSL 451# https://github.com/LiveSplit/livesplit-core/issues/308 452 453- label : Linux mipsel musl 454target : mipsel-unknown-linux-musl 455os : ubuntu-latest 456tests : skip 457dylib : skip 458 459- label : Linux powerpc 460target : powerpc-unknown-linux-gnu 461os : ubuntu-latest 462tests : skip 463 464- label : Linux powerpc64le 465target : powerpc64le-unknown-linux-gnu 466os : ubuntu-latest 467tests : skip 468 469- label : Linux s390x 470target : s390x-unknown-linux-gnu 471os : ubuntu-latest 472tests : skip 473 474# These got removed from cross 475# - label: Linux powerpc64 476# target: powerpc64-unknown-linux-gnu 477# os: ubuntu-latest 478# tests: skip 479# # FIXME: Networking Tests fail due to missing OpenSSL 480# # https://github.com/LiveSplit/livesplit-core/issues/308 481 482# - label: Linux sparc64 483# target: sparc64-unknown-linux-gnu 484# os: ubuntu-latest 485# tests: skip 486 487# macOS 488- label : macOS aarch64 489target : aarch64-apple-darwin 490os : macOS-latest 491cross : skip 492tests : skip 493install_target : true 494# FIXME: Switch OS to ARM macOS once GitHub Actions provides that, 495# use the toolchain instead of the target and run the tests. 496 497- label : macOS x86_64 498target : x86_64-apple-darwin 499os : macOS-latest 500cross : skip 501 502# iOS 503- label : iOS aarch64 504target : aarch64-apple-ios 505os : macOS-latest 506cross : skip 507dylib : skip 508tests : skip 509install_target : true 510 511- label : iOS x86_64 512target : x86_64-apple-ios 513os : macOS-latest 514cross : skip 515dylib : skip 516tests : skip 517install_target : true 518 519# Android 520- label : Android i686 521target : i686-linux-android 522os : ubuntu-latest 523tests : skip 524 525- label : Android x86_64 526target : x86_64-linux-android 527os : ubuntu-latest 528tests : skip 529# The tests fail with an illegal instruction since 1.40 530# https://github.com/rust-lang/rust/issues/67582 531 532- label : Android arm 533target : arm-linux-androideabi 534os : ubuntu-latest 535tests : skip 536 537- label : Android armv7 538target : armv7-linux-androideabi 539os : ubuntu-latest 540tests : skip 541 542- label : Android aarch64 543target : aarch64-linux-android 544os : ubuntu-latest 545tests : skip 546 547# *BSD 548- label : NetBSD x86_64 549target : x86_64-unknown-netbsd 550os : ubuntu-latest 551tests : skip 552 553# Solaris 554# - label: Solaris x86_64 555# target: x86_64-sun-solaris 556# os: ubuntu-latest 557# tests: skip 558# dylib: skip 559# FIXME: Solaris stopped working. core isn't available: 560# https://github.com/LiveSplit/livesplit-core/runs/2777745289?check_suite_focus=true 561 562# Testing other channels 563- label : Windows Beta 564target : x86_64-pc-windows-msvc 565os : windows-latest 566toolchain : beta 567release : skip 568cross : skip 569 570- label : Windows Nightly 571target : x86_64-pc-windows-msvc 572os : windows-latest 573toolchain : nightly 574release : skip 575cross : skip 576 577- label : Windows Beta gnu 578target : x86_64-pc-windows-gnu 579toolchain : beta-x86_64-pc-windows-gnu 580release : skip 581os : windows-latest 582cross : skip 583install_target : true 584 585- label : Windows Nightly gnu 586target : x86_64-pc-windows-gnu 587toolchain : nightly-x86_64-pc-windows-gnu 588release : skip 589os : windows-latest 590cross : skip 591install_target : true 592 593- label : Linux Beta 594target : x86_64-unknown-linux-gnu 595os : ubuntu-latest 596toolchain : beta 597release : skip 598 599- label : Linux Nightly 600target : x86_64-unknown-linux-gnu 601os : ubuntu-latest 602toolchain : nightly 603release : skip 604 605- label : macOS Beta 606target : x86_64-apple-darwin 607os : macOS-latest 608toolchain : beta 609release : skip 610cross : skip 611 612- label : macOS Nightly 613target : x86_64-apple-darwin 614os : macOS-latest 615toolchain : nightly 616release : skip 617cross : skip 618 619steps : 620- name : Checkout Commit 621uses : actions/checkout@v2 622 623- name : Install Rust 624uses : hecrj/setup-rust-action@v1 625with : 626rust-version : ${{ matrix.toolchain || 'stable' }} 627 628- name : Install Target 629if : matrix.install_target != '' 630run : rustup target add ${{ matrix.target }} 631 632- name : Install cross 633if : matrix.cross == '' && matrix.no_std == '' 634run : cargo install cross 635 636- name : Build Static Library 637run : sh .github/workflows/build_static.sh 638env : 639TARGET : ${{ matrix.target }} 640SKIP_CROSS : ${{ matrix.cross }} 641IS_DEPLOY : ${{ startsWith(github.ref, 'refs/tags/') && (matrix.release_anyway != '' || !(startsWith(matrix.toolchain, 'nightly') || startsWith(matrix.toolchain, 'beta'))) }} 642FEATURES : ${{ matrix.features }} 643NO_STD : ${{ matrix.no_std }} 644 645- name : Build Shared Library 646if : matrix.dylib == '' 647run : sh .github/workflows/build_shared.sh 648env : 649TARGET : ${{ matrix.target }} 650SKIP_CROSS : ${{ matrix.cross }} 651IS_DEPLOY : ${{ startsWith(github.ref, 'refs/tags/') && (matrix.release_anyway != '' || !(startsWith(matrix.toolchain, 'nightly') || startsWith(matrix.toolchain, 'beta'))) }} 652FEATURES : ${{ matrix.features }} 653 654- name : Test 655if : matrix.tests == '' 656run : sh .github/workflows/test.sh 657env : 658TARGET : ${{ matrix.target }} 659SKIP_CROSS : ${{ matrix.cross }} 660SKIP_AUTO_SPLITTING : ${{ matrix.auto_splitting }} 661SKIP_NETWORKING : ${{ matrix.networking }} 662SKIP_SOFTWARE_RENDERING : ${{ matrix.software_rendering }} 663 664- name : Prepare Release 665if : startsWith(github.ref, 'refs/tags/') && matrix.release == '' 666shell : bash 667run : .github/workflows/before_deploy.sh 668env : 669OS_NAME : ${{ matrix.os }} 670TARGET : ${{ matrix.target }} 671 672- name : Release 673if : startsWith(github.ref, 'refs/tags/') && matrix.release == '' 674uses : softprops/action-gh-release@v1 675with : 676files : livesplit-core-*.* 677env : 678GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 679 680bind_gen : 681name : Generate bindings 682runs-on : ubuntu-latest 683steps : 684- name : Checkout Commit 685uses : actions/checkout@v2 686 687- name : Install Rust 688uses : hecrj/setup-rust-action@v1 689 690- name : Generate bindings 691run : | 692cd capi/bind_gen 693cargo run 694cd ../.. 695 696clippy : 697name : Check clippy lints 698runs-on : ubuntu-latest 699steps : 700- name : Checkout Commit 701uses : actions/checkout@v2 702 703- name : Install Rust 704uses : hecrj/setup-rust-action@v1 705with : 706components : clippy 707 708- name : Run Clippy 709run : cargo clippy --all-features 710 711format : 712name : Check formatting 713runs-on : ubuntu-latest 714steps : 715- name : Checkout Commit 716uses : actions/checkout@v2 717 718- name : Install Rust 719uses : hecrj/setup-rust-action@v1 720with : 721components : rustfmt 722 723- name : Run cargo fmt 724run : cargo fmt -- --check || true 725 726bench : 727name : Run benchmarks 728runs-on : ubuntu-latest 729env : 730CRITERION_TOKEN : ${{ secrets.CRITERION_TOKEN }} 731steps : 732- name : Checkout 733uses : actions/checkout@v2 734 735- name : Install Rust 736uses : hecrj/setup-rust-action@v1 737 738- name : Run benchmarks 739run : | 740# run benchmarks and save baseline to "criterion.dev.temp" 741cargo bench --all-features -- --verbose --noplot --save-baseline criterion.dev.temp 742 743# # set the path to the file to upload to criterion.dev 744# echo "CRITERION_FILE_PATH=$(find ./target/criterion/ -name raw.csv)" >> $GITHUB_ENV 745 746# - name: Upload benchmarks 747# run: | 748# # upload the file 749# curl -F 'raw.csv=@${{ env.CRITERION_FILE_PATH }}' \ 750# 'https://api.criterion.dev/v1/${{ github.repository }}/measurements?token=${{ secrets.CRITERION_TOKEN }}&commit=${{ github.sha }}' 751 752docs : 753name : Generate documentation 754if : startsWith(github.ref, 'refs/tags/') 755runs-on : ubuntu-latest 756steps : 757- uses : actions/checkout@master 758- name : Use Node 10 759uses : actions/setup-node@v1 760with : 761node-version : '10.x' 762- name : Build TypeScript documentation 763run : | 764cd capi/js 765make docs 766cd ../.. 767- name : Upload documentation files 768run : | 769 git config --global user.email "action@github.com" 770 git config --global user.name "GitHub Action" 771 git clone -q "https://github.com/LiveSplit/livesplit-core-docs" 772 cd livesplit-core-docs 773 rm -r * 774 mv ../docs/* . 775 git add . 776 git commit --amend -m "Update documentation" 777 git push --force https://action:${{ secrets.LIVESPLIT_CORE_DOCS_UPLOAD }}@github.com/LiveSplit/livesplit-core-docs.git