2024-12-06 19:57:47 +00:00
|
|
|
on: [push, pull_request, create]
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-12-06 20:40:26 +00:00
|
|
|
env:
|
|
|
|
CARGO_PROFILE_TEST_BUILD_OVERRIDE_DEBUG: true
|
|
|
|
CARGO_PROFILE_dev_OPT_LEVEL: 0
|
|
|
|
RUSTFLAGS: ""
|
2024-12-06 19:57:47 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
jdk: [11]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
2024-12-06 20:40:26 +00:00
|
|
|
- name: Install libdbus on Ubuntu
|
|
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y libdbus-1-dev
|
2024-12-06 21:30:13 +00:00
|
|
|
- run: cargo test
|
2024-12-06 20:16:39 +00:00
|
|
|
- run: cargo build --release
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: mostr_${{ github.sha }}_${{ matrix.os }}
|
2024-12-07 00:10:28 +00:00
|
|
|
path: |
|
|
|
|
target/release/mostr
|
|
|
|
target/release/mostr.exe
|
2024-12-06 20:16:39 +00:00
|
|
|
#build-arm:
|
|
|
|
# runs-on: ${{ matrix.os }}
|
|
|
|
# if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
# strategy:
|
|
|
|
# matrix:
|
|
|
|
# os: [macos-latest-large]
|
|
|
|
# jdk: [11]
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/checkout@v4
|
|
|
|
# - uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
|
|
# - run: cargo test --all-features
|
2024-12-06 19:57:47 +00:00
|
|
|
#release:
|
|
|
|
# needs: [build, build-arm]
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/download-artifact@v4 # https://github.com/actions/download-artifact
|
|
|
|
# with:
|
|
|
|
# pattern: software-challenge-gui-${{ github.sha }}-*
|
|
|
|
# path: build
|
|
|
|
# merge-multiple: true
|
|
|
|
# - name: Release ${{ github.ref }}
|
|
|
|
# uses: softprops/action-gh-release@v1 # https://github.com/softprops/action-gh-release
|
|
|
|
# with:
|
|
|
|
# files: build/*.jar
|
|
|
|
# env:
|
|
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|