iced/.github/workflows/build.yml

164 lines
4.5 KiB
YAML
Raw Normal View History

2019-09-24 23:22:36 +00:00
name: GitHub CI
2020-07-10 15:20:31 +00:00
on:
push:
paths:
- ".github/workflows/build.yml"
2020-11-28 00:32:59 +00:00
- "build/**"
- "src/**"
- "!**/*.md"
2020-08-27 21:58:46 +00:00
branches:
- master
pull_request:
paths:
2020-11-28 00:32:59 +00:00
- "build/**"
- "src/**"
- "!**/*.md"
2020-07-10 15:20:31 +00:00
branches:
- master
# Keep this in sync with the other *.yml files
env:
CI_REQ_DOTNET_SDK_VER: 5.0.300
2021-08-16 22:42:13 +00:00
COVERAGE_FILENAME: coverage.info
2021-02-09 21:05:57 +00:00
CI_NODE_MIN_VER: 12.0.0
RUSTFLAGS: -D warnings
2020-11-28 22:16:35 +00:00
MACOSX_DEPLOYMENT_TARGET: 10.12
2019-09-24 23:22:36 +00:00
jobs:
#############################################################################
#############################################################################
#############################################################################
2020-11-28 00:32:59 +00:00
build-dotnet:
name: C# (${{matrix.os}})
runs-on: ${{matrix.os}}
2019-11-28 01:13:45 +00:00
strategy:
matrix:
os: [ubuntu-latest]
2019-10-03 16:04:21 +00:00
2019-09-24 23:22:36 +00:00
steps:
- uses: actions/checkout@v2.3.4
2019-09-24 23:22:36 +00:00
- uses: actions/setup-dotnet@v1.8.1
with:
dotnet-version: ${{env.CI_REQ_DOTNET_SDK_VER}}
2020-01-26 19:21:08 +00:00
2020-11-28 00:32:59 +00:00
- name: Build and test
shell: bash
run: ./build/build-dotnet --quick-check
2019-09-24 23:22:36 +00:00
2020-10-26 18:49:09 +00:00
- uses: actions/upload-artifact@v2
2019-09-24 23:22:36 +00:00
with:
name: nupkg
2020-11-28 00:32:59 +00:00
path: src/csharp/Intel/Iced/bin/Release/*.*nupkg
2020-10-26 18:49:09 +00:00
if-no-files-found: error
2019-09-25 17:56:12 +00:00
2020-10-26 18:49:09 +00:00
- uses: actions/upload-artifact@v2
2019-10-05 15:57:58 +00:00
with:
name: coverage.info
2020-11-28 17:04:00 +00:00
path: src/csharp/Intel/Iced.UnitTests/${{env.COVERAGE_FILENAME}}
2020-10-26 18:49:09 +00:00
if-no-files-found: error
2019-10-05 15:57:58 +00:00
- 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}}
2020-11-28 00:32:59 +00:00
#############################################################################
#############################################################################
#############################################################################
build-rust:
name: Rust (${{matrix.os}})
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
2020-11-28 00:32:59 +00:00
steps:
- uses: actions/checkout@v2.3.4
2020-11-28 00:32:59 +00:00
- name: Install Rust
2019-10-05 13:52:24 +00:00
shell: bash
2020-11-28 00:32:59 +00:00
run: bash build/ci-install-rust.sh
2019-10-05 13:52:24 +00:00
- uses: actions/setup-dotnet@v1.8.1
2020-11-28 00:32:59 +00:00
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
2019-10-06 18:38:57 +00:00
2020-11-28 00:32:59 +00:00
#############################################################################
#############################################################################
#############################################################################
build-rust-js-wasm:
name: JavaScript (${{matrix.os}})
runs-on: ${{matrix.os}}
2019-11-28 01:13:45 +00:00
strategy:
matrix:
os: [ubuntu-latest]
2019-10-06 18:38:57 +00:00
steps:
- uses: actions/checkout@v2.3.4
2019-10-06 18:38:57 +00:00
2020-11-28 00:32:59 +00:00
- name: Install Rust
shell: bash
run: bash build/ci-install-rust.sh
- uses: actions/setup-node@v2.4.0
2020-01-03 21:12:14 +00:00
with:
2020-11-28 00:32:59 +00:00
node-version: ${{env.CI_NODE_MIN_VER}}
2020-01-03 21:12:14 +00:00
2020-11-28 00:32:59 +00:00
- name: Install wasm-pack
shell: bash
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
2019-11-23 19:36:32 +00:00
2020-11-28 00:32:59 +00:00
- name: Build and test
shell: bash
run: ./build/build-js --no-set-rustflags --quick-check
2020-11-28 00:32:59 +00:00
2021-05-13 19:38:20 +00:00
- uses: actions/upload-artifact@v2
with:
name: npm
path: src/rust/iced-x86-js/pkg/release/iced-x86-*.tgz
if-no-files-found: error
2020-11-28 00:32:59 +00:00
#############################################################################
#############################################################################
#############################################################################
2021-02-12 17:05:37 +00:00
build-rust-python-linux-x64:
2021-02-12 17:23:20 +00:00
name: Python (${{matrix.os}}) x64
runs-on: ${{matrix.os}}
2019-11-23 19:36:32 +00:00
strategy:
matrix:
2021-02-12 17:05:37 +00:00
os: [ubuntu-latest]
2019-11-23 19:36:32 +00:00
steps:
- uses: actions/checkout@v2.3.4
2019-11-23 19:36:32 +00:00
2020-11-28 00:32:59 +00:00
- name: Install Rust
shell: bash
run: bash build/ci-install-rust.sh
- uses: actions/setup-python@v2.2.2
2020-11-28 00:32:59 +00:00
with:
python-version: 3.6
2020-11-28 00:32:59 +00:00
- name: Install Python tools
2021-02-12 17:05:37 +00:00
shell: bash
2020-11-28 00:32:59 +00:00
run: |
2020-11-29 13:07:45 +00:00
python --version 2>&1 | grep "Python 3\.6"
2020-12-04 22:25:08 +00:00
python -m pip install -r src/rust/iced-x86-py/requirements-dev.txt
2020-11-28 00:32:59 +00:00
- name: Build and test
2021-02-12 17:05:37 +00:00
shell: bash
run: ./build/build-python --no-set-rustflags --python python