Skip to content

Commit

Permalink
root: enabled research paper pipeline (srcRESEARCH)
Browse files Browse the repository at this point in the history
Since we want this library to be reliably good, we should enable
the research paper pipeline and place all our details and data in
it. That way, interested folks and code auditors can review the
materials without needing to ping-pong with the maintainers that
often.

This patch enables research paper pipeline (srcRESEARCH) in
root repository.

Co-authored-by: Shuralyov, Jean <[email protected]>
Co-authored-by: Galyna, Cory <[email protected]>
Co-authored-by: (Holloway) Chew, Kean Ho <[email protected]>
Signed-off-by: (Holloway) Chew, Kean Ho <[email protected]>
  • Loading branch information
3 people committed Jun 10, 2024
1 parent 30de314 commit 63e8808
Show file tree
Hide file tree
Showing 6 changed files with 388 additions and 168 deletions.
8 changes: 7 additions & 1 deletion CONFIG.toml
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,12 @@ PROJECT_LIBREOFFICE_MIRROR = "https://ftp.osuosl.org/pub/tdf/libreoffice"
PROJECT_LIBREOFFICE_VERSION = "24.2.1"


# PROJECT_PATH_LIBREOFFICE_ENGINE
# This is a relative pathing to PROJECT_PATH_ROOT + PROJECT_PATH_TOOLS for
# setting up localized environment.
PROJECT_PATH_LIBREOFFICE_ENGINE = "libreoffice-engine"




######################
Expand Down Expand Up @@ -646,7 +652,7 @@ PROJECT_PYPI_README_MIME = "text/markdown"
#
# To enable it: simply supply the path (e.g. default is 'srcRESEARCH').
# To disable it: simply supply an empty path (e.g. default is '').
PROJECT_RESEARCH = ''
PROJECT_RESEARCH = 'srcRESEARCH'



Expand Down
161 changes: 80 additions & 81 deletions automataCI/services/compilers/libreoffice.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function LIBREOFFICE-Get {


function LIBREOFFICE-Get-Path {
switch ("$(OS-Get)") {
switch ("${env:PROJECT_OS}") {
"darwin" {
$___path = "/Applications/LibreOffice.app/Contents/MacOS/soffice"
} "windows" {
Expand Down Expand Up @@ -110,87 +110,66 @@ function LIBREOFFICE-Setup {


# execute
if ($(OS-Get) -eq "darwin") {
$___dest = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\libreoffice\instal.dmg"
$null = FS-Make-Housing-Directory "${___dest}"
$null = FS-Remove-Silently "${___dest}"


## Download directly from provider
$___url = "${env:PROJECT_LIBREOFFICE_MIRROR}/stable/${env:PROJECT_LIBREOFFICE_VERSION}"
$___dest = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TOOLS}\${env:PROJECT_PATH_LIBREOFFICE_ENGINE}"
$___url = "${env:PROJECT_LIBREOFFICE_MIRROR}/stable/${env:PROJECT_LIBREOFFICE_VERSION}"
switch ("${env:PROJECT_OS}") {
"darwin" {
$___dest = "${___dest}\install.dmg"
$___url = "${___url}/mac"
if ($(OS-Get-Arch) -eq "amd64") {
switch ("${env:PROJECT_ARCH}") {
"amd64" {
$___url = "${___url}/x86_64"
$___url = "${___url}/LibreOffice_${env:PROJECT_LIBREOFFICE_VERSION}_MacOS_x86-64.dmg"
} elseif ($(OS-Get-Arch) -eq "arm64") {
} "arm64" {
$___url = "${___url}/aarch64"
$___url = "${___url}/LibreOffice_${env:PROJECT_LIBREOFFICE_VERSION}_MacOS_aarch64.dmg"
} else {
return 1
}


# download from provider
$___process = HTTP-Download "GET" "${___url}" "${___dest}"
if ($___process -ne 0) {
return 1
}


## silently install
$___process = Apple-Install-DMG "${___dest}"
if ($___process -ne 0) {
return 1
}


## clean up
$null = FS-Remove-Silently "${___dest}"
} elseif ($(OS-Get) -eq "windows") {
## Attempt to use directly from the provider
$___dest = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\libreoffice\install.msi"
$null = FS-Make-Housing-Directory "${___dest}"
$null = FS-Remove-Silently "${___dest}"

} default {
$___url = ""
}}

$___url = "${env:PROJECT_LIBREOFFICE_MIRROR}/stable/${env:PROJECT_LIBREOFFICE_VERSION}"
$___url = "${___url}/win"
if ($(OS-Get-Arch) -eq "amd64") {
$___url = "${___url}/x86_64"
$___url = "${___url}/LibreOffice_${env:PROJECT_LIBREOFFICE_VERSION}_Win_x86-64.msi"
} elseif ($(OS-Get-Arch) -eq "arm64") {
$___url = "${___url}/aarch64"
$___url = "${___url}/LibreOffice_${env:PROJECT_LIBREOFFICE_VERSION}_Win_aarch64.msi"
} else {
## fallback to choco as the last resort
$___process = OS-Is-Command-Available "choco"
## attempt to download from vendor directly
if ($(STRINGS-Is-Empty "${___url}") -ne 0) {
$null = FS-Make-Housing-Directory "${___dest}"
$null = FS-Remove-Silently "${___dest}"
$___process = HTTP-Download "GET" "${___url}" "${___dest}"
if ($___process -ne 0) {
return 1
}

$___process = OS-Exec "choco" "install libreoffice-fresh -y"
$___process = Apple-Install-DMG "${___dest}"
if ($___process -ne 0) {
return 1
}

return 0
}

$___process = HTTP-Download "GET" "${___url}" "${___dest}"
if ($___process -ne 0) {
return 1
$null = FS-Remove-Silently "${___dest}"
}
} "windows" {
$___dest = "${___dest}\install.msi"
$___url = "${___url}/win"
switch "${env:PROJECT_ARCH}" {
"amd64" {
$___url = "${___url}/x86_64"
$___url = "${___url}/LibreOffice_${env:PROJECT_LIBREOFFICE_VERSION}_Win_x86-64.msi"
} "arm64" {
$___url = "${___url}/aarch64"
$___url = "${___url}/LibreOffice_${env:PROJECT_LIBREOFFICE_VERSION}_Win_aarch64.msi"
} default {
$___url = ""
}}

$___process = FS-Is-File "${___dest}"
if ($___process -ne 0) {
return 1
## attempt to download from vendor directly
if ($(STRINGS-Is-Empty "${___url}") -ne 0) {
$null = FS-Make-Housing-Directory "${___dest}"
$null = FS-Remove-Silently "${___dest}"
$___process = HTTP-Download "GET" "${___url}" "${___dest}"
if ($___process -eq 0) {
$___process = MSI-Install-Silent "${___dest}"
$null = FS-Remove-Silently "${___dest}"
}
}

$___process = MSI-Install-Silent "${___dest}"
$null = FS-Remove-Silently "${___dest}"
$null = OS-Sync
if ($___process -ne 0) {
## fallback to choco as the last resort
## fallback to choco as the last resort
if (($(STRINGS-Is-Empty "${___url}") -eq 0) -or ($___process -ne 0)) {
$___process = OS-Is-Command-Available "choco"
if ($___process -ne 0) {
return 1
Expand All @@ -202,27 +181,47 @@ function LIBREOFFICE-Setup {
}

$null = OS-Sync
return 0
}
} else {
## check compatible platform version
$___url = "https://appimages.libreitalia.org"
switch ("$(OS-Get-Arch)") {
"amd64" {
$___url = "${___url}/LibreOffice-fresh.full-x86_64.AppImage"
} default {
return 1
}}

} "linux" {
$___process = OS-Is-Command-Available "flatpak"
if ($___process -eq 0) {
$___process = OS-Exec "flatpak" "--user install org.libreoffice.LibreOffice"
}

## download appimage portable version
$___dest = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TOOLS}\libreoffice\bin\libreoffice"
$null = FS-Make-Housing-Directory "${___dest}"
$null = FS-Remove-Silently "${___dest}"
$___process = HTTP-Download "GET" "${___url}" "${___dest}"
## download appimage as last resort
if ($___process -ne 0) {
return 1
$___dest = "${___dest}\bin\libreoffice"
$___url = "https://appimages.libreitalia.org"
switch ("${env:PROJECT_ARCH}") {
"amd64" {
$___url = "${___url}/LibreOffice-fresh.full-x86_64.AppImage"
} default {
return 1
}}

if ($(STRINGS-Is-Empty "${___url}") -ne 0) {
$null = FS-Make-Housing-Directory "${___dest}"
$null = FS-Remove-Silently "${___dest}"
$___process = HTTP-Download "GET" "${___url}" "${___dest}"
if ($___process -ne 0) {
return 1
}

$___process = FS-Is-File "${___dest}"
if ($___process -ne 0) {
return 1
}
}
}
} default {
return 1 # unsupported
}}


# test the output
$___process = LIBREOFFICE-Is-Available
if ($___process -ne 0) {
return 1
}


Expand Down
Loading

0 comments on commit 63e8808

Please sign in to comment.