2019-09-24 23:22:36 +00:00
|
|
|
name: GitHub CI
|
2020-07-10 15:20:31 +00:00
|
|
|
on:
|
|
|
|
push:
|
2022-02-28 21:06:04 +00:00
|
|
|
paths:
|
|
|
|
- ".github/workflows/build.yml"
|
|
|
|
- "build/**"
|
|
|
|
- "src/**"
|
|
|
|
- "!**/*.md"
|
|
|
|
branches:
|
|
|
|
- master
|
2020-08-27 21:58:46 +00:00
|
|
|
pull_request:
|
|
|
|
paths:
|
2022-02-25 11:16:13 +00:00
|
|
|
- ".github/workflows/build.yml"
|
2020-11-28 00:32:59 +00:00
|
|
|
- "build/**"
|
2020-11-07 00:04:09 +00:00
|
|
|
- "src/**"
|
|
|
|
- "!**/*.md"
|
2020-07-10 15:20:31 +00:00
|
|
|
branches:
|
|
|
|
- master
|
2020-11-07 00:04:09 +00:00
|
|
|
|
2021-02-14 19:19:46 +00:00
|
|
|
# Keep this in sync with the other *.yml files
|
2020-11-07 00:04:09 +00:00
|
|
|
env:
|
2022-02-26 08:28:25 +00:00
|
|
|
CI_REQ_DOTNET_SDK_VER: '6.0.x'
|
|
|
|
CI_NODE_MIN_VER: '14.0.0'
|
|
|
|
RUSTFLAGS: '-D warnings'
|
|
|
|
MACOSX_DEPLOYMENT_TARGET: '10.12'
|
2019-09-24 23:22:36 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-11-28 09:35:33 +00:00
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
#############################################################################
|
|
|
|
#############################################################################
|
|
|
|
|
2020-11-28 00:32:59 +00:00
|
|
|
build-dotnet:
|
2020-11-07 00:04:09 +00:00
|
|
|
name: C# (${{matrix.os}})
|
|
|
|
runs-on: ${{matrix.os}}
|
2019-11-28 01:13:45 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-02-14 19:19:46 +00:00
|
|
|
os: [ubuntu-latest]
|
2019-10-03 16:04:21 +00:00
|
|
|
|
2019-09-24 23:22:36 +00:00
|
|
|
steps:
|
2022-03-02 08:19:37 +00:00
|
|
|
- uses: actions/checkout@v3
|
2019-09-24 23:22:36 +00:00
|
|
|
|
2022-02-28 08:07:46 +00:00
|
|
|
- uses: actions/setup-dotnet@v2
|
2020-11-07 00:04:09 +00:00
|
|
|
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
|
2020-11-07 00:04:09 +00:00
|
|
|
shell: bash
|
2021-02-14 19:19:46 +00:00
|
|
|
run: ./build/build-dotnet --quick-check
|
2019-09-24 23:22:36 +00:00
|
|
|
|
2022-04-11 08:24:54 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
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
|
|
|
|
2022-04-11 08:24:54 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
2019-10-05 15:57:58 +00:00
|
|
|
with:
|
|
|
|
name: coverage.info
|
2021-10-12 21:13:32 +00:00
|
|
|
path: src/csharp/Intel/Iced.UnitTests/coverage.info
|
2020-10-26 18:49:09 +00:00
|
|
|
if-no-files-found: error
|
2019-10-05 15:57:58 +00:00
|
|
|
|
2021-02-14 19:19:46 +00:00
|
|
|
- name: Upload coverage report
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
shell: bash
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
2021-10-12 21:13:32 +00:00
|
|
|
# https://docs.codecov.com/docs/codecov-uploader
|
2021-10-12 17:19:54 +00:00
|
|
|
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
|
|
|
|
curl -Os https://uploader.codecov.io/latest/linux/codecov
|
|
|
|
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
|
|
|
|
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
|
|
|
|
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
|
|
|
|
shasum -a 256 -c codecov.SHA256SUM
|
|
|
|
chmod +x codecov
|
2021-10-12 21:13:32 +00:00
|
|
|
./codecov -t "${{secrets.CODECOV_TOKEN}}" -f "src/csharp/Intel/Iced.UnitTests/coverage.info"
|
2021-02-14 19:19:46 +00:00
|
|
|
|
2020-11-28 00:32:59 +00:00
|
|
|
#############################################################################
|
|
|
|
#############################################################################
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
build-rust:
|
|
|
|
name: Rust (${{matrix.os}})
|
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-02-14 19:19:46 +00:00
|
|
|
os: [ubuntu-latest]
|
2020-11-28 00:32:59 +00:00
|
|
|
|
|
|
|
steps:
|
2022-03-02 08:19:37 +00:00
|
|
|
- uses: actions/checkout@v3
|
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
|
|
|
|
2022-02-28 08:07:46 +00:00
|
|
|
- uses: actions/setup-dotnet@v2
|
2020-11-28 00:32:59 +00:00
|
|
|
with:
|
|
|
|
dotnet-version: ${{env.CI_REQ_DOTNET_SDK_VER}}
|
|
|
|
|
2021-10-12 21:13:32 +00:00
|
|
|
- name: Install kcov
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-01-11 14:20:12 +00:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install kcov
|
2021-10-12 21:13:32 +00:00
|
|
|
|
2020-11-28 00:32:59 +00:00
|
|
|
- name: Build and test
|
2020-11-07 00:04:09 +00:00
|
|
|
shell: bash
|
2021-10-12 21:13:32 +00:00
|
|
|
run: ./build/build-rust --no-set-rustflags --no-tests --test-current --test-msrv --test-no_std --coverage
|
|
|
|
|
2022-04-11 08:24:54 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-10-12 21:13:32 +00:00
|
|
|
with:
|
|
|
|
name: rust-coverage
|
|
|
|
path: cov-out/rust/merged/
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload coverage report
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
shell: bash
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
# https://docs.codecov.com/docs/codecov-uploader
|
|
|
|
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
|
|
|
|
curl -Os https://uploader.codecov.io/latest/linux/codecov
|
|
|
|
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
|
|
|
|
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
|
|
|
|
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
|
|
|
|
shasum -a 256 -c codecov.SHA256SUM
|
|
|
|
chmod +x codecov
|
|
|
|
./codecov -t "${{secrets.CODECOV_TOKEN}}" -f "cov-out/rust/merged/kcov-merged/cobertura.xml"
|
2019-10-06 18:38:57 +00:00
|
|
|
|
2020-11-28 00:32:59 +00:00
|
|
|
#############################################################################
|
|
|
|
#############################################################################
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
build-rust-js-wasm:
|
|
|
|
name: JavaScript (${{matrix.os}})
|
2020-11-07 00:04:09 +00:00
|
|
|
runs-on: ${{matrix.os}}
|
2019-11-28 01:13:45 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-02-14 19:19:46 +00:00
|
|
|
os: [ubuntu-latest]
|
2019-10-06 18:38:57 +00:00
|
|
|
|
|
|
|
steps:
|
2022-03-02 08:19:37 +00:00
|
|
|
- uses: actions/checkout@v3
|
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
|
|
|
|
|
2022-02-25 08:08:58 +00:00
|
|
|
- uses: actions/setup-node@v3
|
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
|
2020-11-07 00:04:09 +00:00
|
|
|
shell: bash
|
2021-07-08 13:12:09 +00:00
|
|
|
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
|
2021-02-14 19:19:46 +00:00
|
|
|
run: ./build/build-js --no-set-rustflags --quick-check
|
2020-11-28 00:32:59 +00:00
|
|
|
|
2022-04-11 08:24:54 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-05-13 19:38:20 +00:00
|
|
|
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
|
2020-11-07 00:04:09 +00:00
|
|
|
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:
|
2022-03-02 08:19:37 +00:00
|
|
|
- uses: actions/checkout@v3
|
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
|
|
|
|
|
2022-03-01 08:10:10 +00:00
|
|
|
- uses: actions/setup-python@v3
|
2020-11-28 00:32:59 +00:00
|
|
|
with:
|
2022-01-10 17:45:40 +00:00
|
|
|
python-version: '3.7'
|
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: |
|
2022-01-10 17:45:40 +00:00
|
|
|
python --version 2>&1 | grep 'Python 3\.7'
|
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
|
2021-02-14 19:19:46 +00:00
|
|
|
run: ./build/build-python --no-set-rustflags --python python
|