mirror of https://github.com/icedland/iced.git
164 lines
4.5 KiB
YAML
164 lines
4.5 KiB
YAML
name: GitHub CI
|
|
on:
|
|
push:
|
|
paths:
|
|
- ".github/workflows/build.yml"
|
|
- "build/**"
|
|
- "src/**"
|
|
- "!**/*.md"
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
paths:
|
|
- "build/**"
|
|
- "src/**"
|
|
- "!**/*.md"
|
|
branches:
|
|
- master
|
|
|
|
# Keep this in sync with the other *.yml files
|
|
env:
|
|
CI_REQ_DOTNET_SDK_VER: 5.0.100
|
|
COVERAGE_FILENAME: coverage.net5.0.info
|
|
CI_NODE_MIN_VER: 12.0.0
|
|
RUSTFLAGS: -D warnings
|
|
MACOSX_DEPLOYMENT_TARGET: 10.12
|
|
|
|
jobs:
|
|
|
|
#############################################################################
|
|
#############################################################################
|
|
#############################################################################
|
|
|
|
build-dotnet:
|
|
name: C# (${{matrix.os}})
|
|
runs-on: ${{matrix.os}}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- uses: actions/setup-dotnet@v1.8.0
|
|
with:
|
|
dotnet-version: ${{env.CI_REQ_DOTNET_SDK_VER}}
|
|
|
|
- name: Build and test
|
|
shell: bash
|
|
run: ./build/build-dotnet --quick-check
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: nupkg
|
|
path: src/csharp/Intel/Iced/bin/Release/*.*nupkg
|
|
if-no-files-found: error
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: coverage.info
|
|
path: src/csharp/Intel/Iced.UnitTests/${{env.COVERAGE_FILENAME}}
|
|
if-no-files-found: error
|
|
|
|
- name: Upload coverage report
|
|
if: github.ref == 'refs/heads/master'
|
|
shell: bash
|
|
continue-on-error: true
|
|
run: |
|
|
curl --proto '=https' --tlsv1.2 -sSf https://codecov.io/bash | bash -s -- -f "src/csharp/Intel/Iced.UnitTests/${{env.COVERAGE_FILENAME}}"
|
|
env:
|
|
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
|
|
|
|
#############################################################################
|
|
#############################################################################
|
|
#############################################################################
|
|
|
|
build-rust:
|
|
name: Rust (${{matrix.os}})
|
|
runs-on: ${{matrix.os}}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- name: Install Rust
|
|
shell: bash
|
|
run: bash build/ci-install-rust.sh
|
|
|
|
- uses: actions/setup-dotnet@v1.8.0
|
|
with:
|
|
dotnet-version: ${{env.CI_REQ_DOTNET_SDK_VER}}
|
|
|
|
- name: Build and test
|
|
shell: bash
|
|
run: ./build/build-rust --no-set-rustflags --no-tests --test-current --test-msrv --test-no_std
|
|
|
|
#############################################################################
|
|
#############################################################################
|
|
#############################################################################
|
|
|
|
build-rust-js-wasm:
|
|
name: JavaScript (${{matrix.os}})
|
|
runs-on: ${{matrix.os}}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- name: Install Rust
|
|
shell: bash
|
|
run: bash build/ci-install-rust.sh
|
|
|
|
- uses: actions/setup-node@v2.1.5
|
|
with:
|
|
node-version: ${{env.CI_NODE_MIN_VER}}
|
|
|
|
- name: Install wasm-pack
|
|
shell: bash
|
|
run: npm install -g wasm-pack
|
|
|
|
- name: Build and test
|
|
shell: bash
|
|
run: ./build/build-js --no-set-rustflags --quick-check
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: npm
|
|
path: src/rust/iced-x86-js/pkg/release/iced-x86-*.tgz
|
|
if-no-files-found: error
|
|
|
|
#############################################################################
|
|
#############################################################################
|
|
#############################################################################
|
|
|
|
build-rust-python-linux-x64:
|
|
name: Python (${{matrix.os}}) x64
|
|
runs-on: ${{matrix.os}}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- name: Install Rust
|
|
shell: bash
|
|
run: bash build/ci-install-rust.sh
|
|
|
|
- uses: actions/setup-python@v2.2.2
|
|
with:
|
|
python-version: 3.6
|
|
- name: Install Python tools
|
|
shell: bash
|
|
run: |
|
|
python --version 2>&1 | grep "Python 3\.6"
|
|
python -m pip install -r src/rust/iced-x86-py/requirements-dev.txt
|
|
|
|
- name: Build and test
|
|
shell: bash
|
|
run: ./build/build-python --no-set-rustflags --python python
|