Action roll...

This commit is contained in:
Anne de Jong 2023-10-05 21:39:41 +02:00
parent 7993d81808
commit 31208db325
5 changed files with 47 additions and 84 deletions

View File

@ -1,78 +0,0 @@
kind: pipeline
type: docker
name: archlinux
clone:
depth: 50
steps:
- name: archlinux_build_test
image: archlinux:latest
pull: if-not-exists
volumes:
- name: archlinux_ccache
path: /root/.ccache
commands:
- scripts/build_archlinux.sh
volumes:
- name: archlinux_ccache
host:
path: /tmp/archlinux_ccache
---
kind: pipeline
type: docker
name: ubuntu
clone:
depth: 3
volumes:
- name: archlinux_ccache
path: /root/.ccache
steps:
- name: ubuntu_build_test
image: ubuntu:latest
pull: if-not-exists
volumes:
- name: ubuntu_ccache
path: /root/.ccache
environment:
commands:
- scripts/build_ubuntu.sh
- name: ubuntu_publish
image: plugins/gitea_release
settings:
files: dist/*
base_url: https:/code.ascee.nl
# when:
#branch: master
volumes:
- name: ubuntu_ccache
host:
path: /tmp/ubuntu_ccache
---
kind: pipeline
type: docker
name: documentation_build_master
trigger:
branch:
master
clone:
depth: 3
steps:
- name: build_documentation_master
image: plugins/docker
settings:
repo: ascee/lasp_ascee_nl
tags: latest
username:
from_secret: docker_username
password:
from_secret: docker_password

View File

@ -0,0 +1,35 @@
name: Building and testing LASP
on:
push:
tags:
- '*'
jobs:
Build-Test-Ubuntu:
runs-on: ubuntu-latest
container: ascee/ubuntu_build:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build
run: |
pip install build
python3 -m build
Release-Ubuntu:
runs-on: ubuntu-latest
container: ascee/ubuntu_build:latest
needs: Build-Test-Ubuntu
steps:
- name: Release
uses: actions/release-action@main
with:
files: |-
dist/**
api_key: '${{secrets.RELEASE_TOKEN}}'
if: gitea.ref == 'refs/heads/master'

View File

@ -39,7 +39,7 @@ include = ["CMakeLists.txt", "cmake", "cpp_src", "python_src", "img", "scripts",
[tool.py-build-cmake.cmake] # How to build the CMake project [tool.py-build-cmake.cmake] # How to build the CMake project
build_type = "Release" build_type = "Release"
source_path = "." source_path = "."
build_args = ["-j"] build_args = ["-j12"]
install_components = ["python_modules"] install_components = ["python_modules"]
[tool.py-build-cmake.editable] [tool.py-build-cmake.editable]

3
scripts/act_test Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
# Test push workflow of Gitea runner
act push --workflows .gitea/workflows

View File

@ -8,13 +8,16 @@
# Stop on first error # Stop on first error
set -e set -e
# Update cache # Update cache
apt update # apt update
# Install requirements # Install requirements, this is done inside the Docker container to safe some
apt install -y git python3-virtualenv python3-venv libopenblas-dev python3-pip libfftw3-dev libusb-1.0-0-dev libpulse-dev python3-build # work!
# Build # apt install -y git python3 python3-virtualenv python3-venv libopenblas-dev python3-pip libfftw3-dev libusb-1.0-0-dev libpulse-dev python3-build
git submodule update --init --recursive #
# Build in venv
python3 -m venv .venv python3 -m venv .venv
# Activate venv
source .venv/bin/activate source .venv/bin/activate
# Build in venv
pip install build pytest pip install build pytest
python3 -m build python3 -m build
pip install dist/lasp-*linux_x86_64.whl pip install dist/lasp-*linux_x86_64.whl