packaging: bump to 0.9.9 #193
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
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
release: | |
types: [ published ] | |
jobs: | |
build_windows_gui: | |
needs: [build] | |
runs-on: windows-latest | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download artifact | |
uses: actions/download-artifact@v1 | |
with: | |
name: wheels-3.9 | |
path: gui | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-activate-base: true | |
activate-environment: "" | |
- name: Build Electron app | |
run: | | |
cd gui | |
dir | |
conda create --name ETA python=3.11 | |
conda activate ETA | |
conda install conda-forge::conda-pack | |
pip install --find-links=.\ etabackend | |
conda pack -n ETA -o bundle_eta.tar.gz | |
mkdir eta_env | |
tar -xzf bundle_eta.tar.gz -C eta_env | |
yarn | |
yarn dist | |
cd .. | |
ls .\gui\dist\ | |
echo 7z a ETA_Install-win64.zip .\gui\dist\*.exe | |
mkdir artifact | |
move .\gui\dist\*.exe .\artifact | |
- name: Upload artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: ETA_Install-win64 | |
path: artifact | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies and build | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang-11 | |
sudo apt-get install -y llvm-11 | |
pip3 install virtualenv | |
virtualenv venv | |
source venv/bin/activate | |
ls | |
clang-11 etabackend/cpp/PARSE_TimeTagFileHeader.cpp -S -emit-llvm | |
clang-11 etabackend/cpp/PARSE_TimeTags.cpp -S -emit-llvm | |
clang-11 etabackend/cpp/INFRA_vchn.cpp -S -emit-llvm | |
mv *.ll etabackend/ll/posix | |
python3 setup.py bdist_wheel | |
- name: Upload artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: wheels-${{ matrix.python-version }} | |
path: dist | |
publish: | |
needs: [build,test] | |
if: ${{ github.event_name == 'release' }} | |
runs-on: ubuntu-latest | |
env: | |
PYPI_PASSWORD: ${{secrets.PYPI_PASSWORD}} | |
TWINE_PASSWORD: ${{secrets.PYPI_PASSWORD}} | |
TWINE_USERNAME: ${{secrets.PYPI_USERNAME}} | |
PYPI_USERNAME: ${{secrets.PYPI_USERNAME}} | |
strategy: | |
matrix: | |
python-version: [3.9] | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip3 install twine | |
- name: Download artifact | |
uses: actions/download-artifact@v1 | |
with: | |
name: wheels-3.9 | |
path: dist | |
- name: Twine upload | |
run: | | |
ls | |
twine upload dist/*.whl --skip-existing | |
test: | |
needs: [build] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.9", "3.11"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Download artifact | |
uses: actions/download-artifact@v1 | |
with: | |
name: wheels-3.9 | |
path: dist | |
- name: Test with pytest | |
run: | | |
python -m pip install tox tox-gh-actions | |
tox |