Skip to content

v1.19.0

v1.19.0 #23

Workflow file for this run

# This is triggered when a new release is created (using the GitHub UI)
name: New Release
on:
release:
types: [released]
# Keep this in sync with the other *.yml files
env:
CI_REQ_DOTNET_SDK_VER: '7.0.x'
CI_NODE_MIN_VER: 'latest'
RUSTFLAGS: '-D warnings'
MACOSX_DEPLOYMENT_TARGET: '10.12'
JAVA_DISTRIBUTION: 'temurin'
JAVA_VERSION: '8'
jobs:
#############################################################################
#############################################################################
#############################################################################
build-dotnet:
name: C# (${{matrix.os}})
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{env.CI_REQ_DOTNET_SDK_VER}}
- name: Build and test
shell: bash
run: |
extra_args=
if [[ "$OSTYPE" != "linux-gnu"* ]]; then
extra_args=--quick-check
fi
./build/build-dotnet $extra_args
- uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'ubuntu-')
with:
name: nupkg
path: src/csharp/Intel/Iced/bin/Release/*.*nupkg
if-no-files-found: error
#############################################################################
#############################################################################
#############################################################################
build-java:
name: Java (${{matrix.os}})
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: ${{env.JAVA_DISTRIBUTION}}
java-version: ${{env.JAVA_VERSION}}
- name: Build and test
shell: bash
run: |
extra_args=
if [[ "$OSTYPE" != "linux-gnu"* ]]; then
extra_args=--quick-check
fi
./build/build-java $extra_args
- uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'ubuntu-')
with:
name: java
path: src/java/iced-x86/target/iced-x86*
if-no-files-found: error
#############################################################################
#############################################################################
#############################################################################
build-rust:
name: Rust (${{matrix.os}})
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Install Rust
shell: bash
run: bash build/ci-install-rust.sh
- uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{env.CI_REQ_DOTNET_SDK_VER}}
- name: Build and test
shell: bash
run: |
extra_args=
if [[ "$OSTYPE" != "linux-gnu"* ]]; then
extra_args=--quick-check
fi
./build/build-rust --no-set-rustflags $extra_args
#############################################################################
#############################################################################
#############################################################################
build-rust-js-wasm:
name: JavaScript (${{matrix.os}})
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Install Rust
shell: bash
run: bash build/ci-install-rust.sh
- uses: actions/setup-node@v3
with:
node-version: ${{env.CI_NODE_MIN_VER}}
- name: Install wasm-pack
shell: bash
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build and test
shell: bash
run: |
extra_args=
if [[ "$OSTYPE" != "linux-gnu"* ]]; then
extra_args=--quick-check
fi
./build/build-js --no-set-rustflags $extra_args
- uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'ubuntu-')
with:
name: npm
path: src/rust/iced-x86-js/pkg/release/iced-x86-*.tgz
if-no-files-found: error
#############################################################################
#############################################################################
#############################################################################
# If the supported Python versions get updated (added/removed), do:
# - Update .github/workflows/*.yml
# - Search for 3.7, 3\.7, 37, py37
# - Update build/ci-py-build-wheels.sh (update cp37)
# - Update src/rust/iced-x86-py/Cargo.toml (update "abi3-py37" to min supported version)
# - Update src/rust/iced-x86-py/README.md (py min ver: 'Python >= 3.7')
# - Update src/rust/iced-x86-py/build-wheels.sh (search for eg. 37)
# - Update src/rust/iced-x86-py/setup.py (Python versions)
# - Update src/rust/iced-x86-py/tox.ini
build-rust-python-linux-aarch64:
name: Python (${{matrix.os}}) aarch64
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
# TODO: this fails in GitHub Actions, but works locally, so disable for now.
# - name: Build manylinux aarch64
# shell: bash
# run: |
# sudo apt-get update
# sudo apt-get install qemu-user-static
# git clean -xdf
# ./build/py-build-wheels-linux.sh "quay.io/pypa/manylinux2014_aarch64"
#
# - uses: actions/upload-artifact@v3
# with:
# name: py-dist-${{matrix.os}}-aarch64
# path: /tmp/py-dist
# 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@v3
- name: Install Rust
shell: bash
run: bash build/ci-install-rust.sh
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Install Python tools
shell: bash
run: |
python --version 2>&1 | grep 'Python 3\.7'
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
git clean -xdf
- name: Create the sdist
shell: bash
run: |
git reset .
git checkout .
git clean -xdf
./build/build-python --sdist-only
mkdir -p /tmp/py-dist
cp src/rust/iced-x86-py/dist/* /tmp/py-dist
git clean -xdf
- name: Build manylinux x86_64
shell: bash
run: |
git clean -xdf
./build/py-build-wheels-linux.sh "quay.io/pypa/manylinux2014_x86_64" --pypy
- uses: actions/upload-artifact@v3
with:
name: py-dist-${{matrix.os}}-x64
path: /tmp/py-dist
if-no-files-found: error
#############################################################################
#############################################################################
#############################################################################
build-rust-python-linux-x86:
name: Python (${{matrix.os}}) x86
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Build manylinux i686
shell: bash
run: |
git clean -xdf
./build/py-build-wheels-linux.sh "quay.io/pypa/manylinux2014_i686"
- uses: actions/upload-artifact@v3
with:
name: py-dist-${{matrix.os}}-x86
path: /tmp/py-dist
if-no-files-found: error
#############################################################################
#############################################################################
#############################################################################
build-rust-python-musllinux-x64:
name: Python (${{matrix.os}}) x64 (musllinux)
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Build musllinux x86_64
shell: bash
run: |
git clean -xdf
./build/py-build-wheels-linux.sh "quay.io/pypa/musllinux_1_1_x86_64"
- uses: actions/upload-artifact@v3
with:
name: py-dist-${{matrix.os}}-x86_64-musllinux
path: /tmp/py-dist
if-no-files-found: error
#############################################################################
#############################################################################
#############################################################################
build-rust-python-macos-x64:
name: Python (${{matrix.os}}) x64
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [macos-latest]
steps:
- uses: actions/checkout@v3
- name: Install Rust
shell: bash
run: bash build/ci-install-rust.sh
# NOTE: We use setup-miniconda and not setup-python because setup-python's
# binaries target a later macos version and will produce warnings
# when building wheels on macos.
# https://github.com/actions/setup-python/issues/26
# This also means that all bash shells (that use Python) must
# use the -le options:
# shell: bash -le {0}
# setup-python is faster to install than setup-miniconda so we only
# use setup-miniconda if this is a macos image.
- uses: conda-incubator/setup-miniconda@v2.2.0
with:
python-version: '3.7'
- name: Install Python tools
shell: bash -le {0}
run: |
python --version 2>&1 | grep 'Python 3\.7'
python -m pip install -r src/rust/iced-x86-py/requirements-dev.txt
- name: Build and test
shell: bash -le {0}
run: |
./build/build-python --no-set-rustflags --python python --quick-check
git clean -xdf
- uses: conda-incubator/setup-miniconda@v2.2.0
with:
python-version: '3.7'
- name: Build and test the wheel
shell: bash -le {0}
run: |
python --version 2>&1 | grep 'Python 3\.7'
bash build/ci-py-build-wheels.sh --build
- uses: conda-incubator/setup-miniconda@v2.2.0
with:
python-version: '3.8'
- name: Build and test the wheel
shell: bash -le {0}
run: |
python --version 2>&1 | grep 'Python 3\.8'
bash build/ci-py-build-wheels.sh
- uses: conda-incubator/setup-miniconda@v2.2.0
with:
python-version: '3.9'
- name: Build and test the wheel
shell: bash -le {0}
run: |
python --version 2>&1 | grep 'Python 3\.9'
bash build/ci-py-build-wheels.sh
- uses: conda-incubator/setup-miniconda@v2.2.0
with:
python-version: '3.10'
- name: Build and test the wheel
shell: bash -le {0}
run: |
python --version 2>&1 | grep 'Python 3\.10'
bash build/ci-py-build-wheels.sh
#TODO: enable when it supports 3.11, see all releases: curl -L https://repo.anaconda.com/pkgs/main/osx-64
# - uses: conda-incubator/setup-miniconda@v2.2.0
# with:
# python-version: '3.11'
# - name: Build and test the wheel
# shell: bash -le {0}
# run: |
# python --version 2>&1 | grep 'Python 3\.11'
# bash build/ci-py-build-wheels.sh
- uses: actions/upload-artifact@v3
with:
name: py-dist-${{matrix.os}}-x64
path: /tmp/py-dist
if-no-files-found: error
#############################################################################
#############################################################################
#############################################################################
build-rust-python-windows-x64:
name: Python (${{matrix.os}}) x64
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v3
- name: Install Rust
shell: bash
run: bash build/ci-install-rust.sh
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Install Python tools
shell: bash
run: |
python --version 2>&1 | grep 'Python 3\.7'
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 --quick-check
git clean -xdf
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Build and test the wheel
shell: bash
run: |
python --version 2>&1 | grep 'Python 3\.7'
bash build/ci-py-build-wheels.sh --build
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Build and test the wheel
shell: bash
run: |
python --version 2>&1 | grep 'Python 3\.8'
bash build/ci-py-build-wheels.sh
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Build and test the wheel
shell: bash
run: |
python --version 2>&1 | grep 'Python 3\.9'
bash build/ci-py-build-wheels.sh
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build and test the wheel
shell: bash
run: |
python --version 2>&1 | grep 'Python 3\.10'
bash build/ci-py-build-wheels.sh
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Build and test the wheel
shell: bash
run: |
python --version 2>&1 | grep 'Python 3\.11'
bash build/ci-py-build-wheels.sh
- uses: actions/setup-python@v4
with:
python-version: 'pypy-3.8'
- name: Build and test the wheel
shell: bash
run: |
python --version
python --version 2>&1 | grep 'Python 3\.8'
bash build/ci-py-build-wheels.sh --build --py-kind pypy
- name: Fix upload path
shell: bash
run: |
git clean -xdf
cp -r /tmp/py-dist .
- uses: actions/upload-artifact@v3
with:
name: py-dist-${{matrix.os}}-x64
path: py-dist
if-no-files-found: error
#############################################################################
#############################################################################
#############################################################################
build-rust-python-windows-x86:
name: Python (${{matrix.os}}) x86
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v3
- name: Install Rust
shell: bash
run: bash build/ci-install-rust.sh
- name: Install 32-bit Rust
shell: bash
run: |
rustup install stable-i686-pc-windows-msvc --no-self-update
rustup default stable-i686-pc-windows-msvc
rustup show
- uses: actions/setup-python@v4
with:
python-version: '3.7'
architecture: x86
- name: Build and test the wheel
shell: bash
run: |
python --version 2>&1 | grep 'Python 3\.7'
bash build/ci-py-build-wheels.sh --build
- uses: actions/setup-python@v4
with:
python-version: '3.8'
architecture: x86
- name: Build and test the wheel
shell: bash
run: |
python --version 2>&1 | grep 'Python 3\.8'
bash build/ci-py-build-wheels.sh
- uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: x86
- name: Build and test the wheel
shell: bash
run: |
python --version 2>&1 | grep 'Python 3\.9'
bash build/ci-py-build-wheels.sh
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: x86
- name: Build and test the wheel
shell: bash
run: |
python --version 2>&1 | grep 'Python 3\.10'
bash build/ci-py-build-wheels.sh
- uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: x86
- name: Build and test the wheel
shell: bash
run: |
python --version 2>&1 | grep 'Python 3\.11'
bash build/ci-py-build-wheels.sh
- name: Fix upload path
shell: bash
run: |
git clean -xdf
cp -r /tmp/py-dist .
- uses: actions/upload-artifact@v3
with:
name: py-dist-${{matrix.os}}-x86
path: py-dist
if-no-files-found: error
#############################################################################
#############################################################################
#############################################################################
upload-files:
runs-on: ubuntu-latest
name: Upload files
needs:
- build-dotnet
- build-java
- build-rust
- build-rust-js-wasm
- build-rust-python-linux-aarch64
- build-rust-python-linux-x64
- build-rust-python-linux-x86
- build-rust-python-musllinux-x64
- build-rust-python-macos-x64
- build-rust-python-windows-x64
- build-rust-python-windows-x86
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{env.CI_REQ_DOTNET_SDK_VER}}
- uses: actions/setup-java@v3
with:
distribution: ${{env.JAVA_DISTRIBUTION}}
java-version: ${{env.JAVA_VERSION}}
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: actions/setup-node@v3
with:
node-version: ${{env.CI_NODE_MIN_VER}}
registry-url: "https://registry.npmjs.org"
- uses: actions/download-artifact@v3
with:
path: /tmp/artifacts
- name: Verify downloads
shell: bash
run: |
if [ -z "$(ls -A /tmp/artifacts/nupkg/Iced.*.nupkg)" ]; then
echo "Missing nupkg files"
exit 1
fi
if [ -z "$(ls -A /tmp/artifacts/npm/iced-x86-*.tgz)" ]; then
echo "Missing npm files"
exit 1
fi
mkdir /tmp/py-dist-tmp
mkdir /tmp/py-dist
for path in /tmp/artifacts/py-dist-*; do
cp "$path/"* /tmp/py-dist-tmp
done
mv /tmp/py-dist-tmp/iced_x86-*.whl /tmp/py-dist
mv /tmp/py-dist-tmp/iced-x86-*.tar.gz /tmp/py-dist
if [ -n "$(ls -A /tmp/py-dist-tmp/* 2>/dev/null)" ]; then
ls -l /tmp/py-dist-tmp
echo "Unknown files found (see above)"
echo "If it's a new Python version, see Python version comment above (`build-rust-python`)"
exit 1
fi
rmdir /tmp/py-dist-tmp
- name: Upload checks
shell: bash
run: |
python -m pip install -U twine
python -m twine check /tmp/py-dist/*
dotnet nuget push --help
cargo publish --help
npm publish --help
mvn --help
- name: Upload to nuget.org
shell: bash
run: |
for file in /tmp/artifacts/nupkg/Iced.*.nupkg; do
dotnet nuget push "$file" --api-key "${{secrets.NUGET_APIKEY}}" --source https://api.nuget.org/v3/index.json
done
- name: Upload to crates.io
shell: bash
run: |
git reset .
git checkout .
git clean -xdf
cd src/rust/iced-x86
cargo login --color always -- "${{secrets.CRATES_IO_TOKEN}}"
# --no-verify: we've tested building everything already
cargo publish --color always --no-verify
- name: Upload to pypi.org
shell: bash
run: |
python -m twine upload --non-interactive -u __token__ -p "${{secrets.PYPI_TOKEN}}" /tmp/py-dist/*
- name: Upload to npmjs.com
shell: bash
run: |
npm publish /tmp/artifacts/npm/iced-x86-*.tgz
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Set up Apache Maven Central
uses: actions/setup-java@v3
with:
distribution: ${{env.JAVA_DISTRIBUTION}}
java-version: ${{env.JAVA_VERSION}}
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to Apache Maven Central
run: |
cd src/java/iced-x86
mvn deploy
env:
MAVEN_USERNAME: wtfsck
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}