cicd-windows with smoketest #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TODO: | |
# (-) Install dfx in WSL | |
# (-) the tool installation | |
# Reference: https://github.com/WebAssembly/wasi-sdk/blob/main/.github/workflows/main.yml | |
name: cicd-windows | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- "src/**" | |
- "test/**" | |
- "Makefile" | |
- ".github/trigger.txt" | |
- ".github/workflows/cicd-win.yml" | |
jobs: | |
all: | |
name: all | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8, 3.11] | |
include: | |
- arch: x64 | |
steps: | |
# https://github.com/marketplace/actions/setup-miniconda | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Anaconda PowerShell Check | |
shell: powershell | |
run: | | |
conda info | |
conda list | |
# clang++ --version | |
# ------------------------------------------------------------------- | |
# Checkout icpp-pro & icpp-candid as nested directory | |
- name: checkout icpp-pro | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: checkout icpp-candid | |
uses: actions/checkout@v4 | |
with: | |
repository: icppWorld/icpp-candid | |
path: icpp-candid | |
fetch-depth: 0 | |
# ------------------------------------------------------------------- | |
# Install icpp with python dependencies | |
- name: Install icpp-candid from setup.py in conda shell | |
shell: powershell | |
run: | | |
pip install --upgrade pip | |
cd icpp-candid | |
pip install -e ".[dev]" | |
- name: Install icpp-pro from setup.py in conda shell | |
shell: powershell | |
run: | | |
pip install -e ".[dev]" | |
- name: Check versions in conda shell | |
shell: powershell | |
run: | | |
echo "icpp --version: $(icpp --version)" | |
# echo "clang++ --version: $(clang++ --version)" | |
# echo "g++ --version: $(g++ --version)" | |
echo "pip version : $(pip --version)" | |
echo "python version : $(python --version)" | |
echo "Ensure conda works properly" | |
conda info | |
where pip | |
where python | |
where icpp | |
# ------------------------------------------------------------------- | |
# Run the native tests - only mingw64 is needed | |
- name: install-mingw64 | |
shell: powershell | |
run: | | |
echo "Installing mingw64" | |
icpp install-mingw64 | |
- name: native mockic test | |
shell: powershell | |
run: | | |
echo "Testing all_canister_native" | |
python -m scripts.all_canister_native | |
# ------------------------------------------------------------------- | |
# Run the smoke tests - requires wasi-sdk & rust with dependencies | |
- name: install-wasi-sdk | |
shell: powershell | |
run: | | |
echo "Installing wasi-sdk" | |
icpp install-wasi-sdk | |
- name: install-rust | |
shell: powershell | |
run: | | |
echo "Installing rust" | |
icpp install-rust | |
# ------------------------------------------------------------------- | |
# Set up wsl | |
# | |
- name: enable WSL | |
run: | | |
echo "Enabling WSL" | |
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
shell: pwsh | |
- name: wsl setup with Vampire | |
uses: Vampire/setup-wsl@v3 | |
with: | |
distribution: Ubuntu-20.04 | |
additional-packages: | |
build-essential | |
- name: pwd in wsl-bash | |
shell: wsl-bash {0} | |
run: pwd | |
- name: install dfx in wsl-bash | |
shell: wsl-bash {0} | |
run: make install-dfx | |
- name: configure dfx in wsl-bash | |
shell: wsl-bash {0} | |
run: source "$HOME/.local/share/dfx/env" | |
- name: install jp in wsl-bash | |
shell: wsl-bash {0} | |
run: make install-jp-ubuntu | |
- name: Check wsl items accessed from wsl-bash | |
shell: wsl-bash {0} | |
run: | | |
echo "jp version : $(jp --version)" | |
echo "dfx version : $(dfx --version)" | |
- name: Check wsl items accessed from conda shell | |
shell: powershell | |
run: | | |
echo "wsl jp version : $(wsl jp --version)" | |
echo "wsl dfx version : $(wsl --% . ~/.local/share/dfx/env; dfx --version)" | |
- name: smoketest | |
shell: powershell | |
run: | | |
echo "Testing all_canister_deploy_local_pytest" | |
python -m scripts.all_canister_deploy_local_pytest | |