Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace firebird2 dependency with firebird and refactor repo logic. #939

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions .github/workflows/build_installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,7 @@ jobs:

- name: Install Natron pacman repository
run: |
mkdir ${GITHUB_WORKSPACE}/natron_pacman_repo
cd ${GITHUB_WORKSPACE}/natron_pacman_repo
wget https://github.com/NatronGitHub/Natron/releases/download/windows-mingw-package-repo/natron_package_repo.zip
unzip natron_package_repo.zip
NATRON_REPO_PATH=`cygpath -u $GITHUB_WORKSPACE`
echo -e "#NATRON_REPO_START\n[natron]\nSigLevel = Optional TrustAll\nServer = file://${NATRON_REPO_PATH}/natron_pacman_repo/\n#NATRON_REPO_END" >> /etc/pacman.conf
pacman -Syl natron
${GITHUB_WORKSPACE}/.github/workflows/install_natron_pacman_repo.sh ${GITHUB_WORKSPACE} ${GITHUB_WORKSPACE}/natron_pacman_repo
pacman -S --needed --noconfirm mingw-w64-x86_64-natron-build-deps-qt5
- name: Build
Expand Down Expand Up @@ -93,13 +87,7 @@ jobs:

- name: Install Natron pacman repository
run: |
mkdir ${GITHUB_WORKSPACE}/natron_pacman_repo
cd ${GITHUB_WORKSPACE}/natron_pacman_repo
wget https://github.com/NatronGitHub/Natron/releases/download/windows-mingw-package-repo/natron_package_repo.zip
unzip natron_package_repo.zip
NATRON_REPO_PATH=`cygpath -u $GITHUB_WORKSPACE`
echo -e "#NATRON_REPO_START\n[natron]\nSigLevel = Optional TrustAll\nServer = file://${NATRON_REPO_PATH}/natron_pacman_repo/\n#NATRON_REPO_END" >> /etc/pacman.conf
pacman -Syl natron
${GITHUB_WORKSPACE}/.github/workflows/install_natron_pacman_repo.sh ${GITHUB_WORKSPACE} ${GITHUB_WORKSPACE}/natron_pacman_repo
pacman -S --needed --noconfirm mingw-w64-x86_64-natron-build-deps-qt5
- name: Build
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/build_pacman_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,37 @@ jobs:
- name: Install Inno Setup
run: choco install innosetup
shell: pwsh
- name: Prep MinGW package version list
run: |
pacman -Sl mingw64 msys > mingw-package-version-list.txt
- name: Restore natron repo directory from cache
id: restore-natron-repo-cache
uses: actions/cache/restore@v3
with:
path: tools/MINGW-packages/natron_repo
key: ${{ env.cache-name }}-${{ hashFiles('tools/MINGW-packages/**/PKGBUILD') }}
path: natron_repo
key: ${{ env.cache-name }}-${{ hashFiles('mingw-package-version-list.txt', 'tools/MINGW-packages/**/PKGBUILD') }}
- name: Build natron package repo
id: build-package-repo
# Allow continuing after error so cache gets updated and makes reruns faster.
continue-on-error: true
run: |
cd tools/MINGW-packages
./build_natron_package_repo.sh natron_repo
tools/MINGW-packages/build_natron_package_repo.sh natron_repo
REPO_VERSION=`cat ${GITHUB_WORKSPACE}/tools/MINGW-packages/windows_pacman_repo_version.txt`
echo "REPO_VERSION=${REPO_VERSION}" >> "$GITHUB_OUTPUT"
- name: Save natron repo directory to cache
id: save-natron-repo-cache
uses: actions/cache/save@v3
# save even if build fails.
if: always()
with:
path: tools/MINGW-packages/natron_repo
key: ${{ env.cache-name }}-${{ hashFiles('tools/MINGW-packages/**/PKGBUILD') }}
path: natron_repo
key: ${{ env.cache-name }}-${{ hashFiles('mingw-package-version-list.txt', 'tools/MINGW-packages/**/PKGBUILD') }}
- name: Upload natron_package_repo artifacts
uses: actions/upload-artifact@v3
with:
name: natron_package_repo
path: tools/MINGW-packages/natron_repo
name: natron_package_repo-${{ steps.build-package-repo.outputs.REPO_VERSION }}
path: natron_repo
- name: Check on failures
if: steps.build-package-repo.outcome != 'success'
run: exit 1
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,7 @@ jobs:

- name: Install Natron pacman repository
run: |
mkdir ${GITHUB_WORKSPACE}/natron_pacman_repo
cd ${GITHUB_WORKSPACE}/natron_pacman_repo
wget https://github.com/NatronGitHub/Natron/releases/download/windows-mingw-package-repo/natron_package_repo.zip
unzip natron_package_repo.zip
NATRON_REPO_PATH=`cygpath -u $GITHUB_WORKSPACE`
echo -e "#NATRON_REPO_START\n[natron]\nSigLevel = Optional TrustAll\nServer = file://${NATRON_REPO_PATH}/natron_pacman_repo/\n#NATRON_REPO_END" >> /etc/pacman.conf
pacman -Syl natron
${GITHUB_WORKSPACE}/.github/workflows/install_natron_pacman_repo.sh ${GITHUB_WORKSPACE} ${GITHUB_WORKSPACE}/natron_pacman_repo
pacman -S --needed --noconfirm mingw-w64-x86_64-natron-build-deps-qt5
- name: Download OpenColorIO-Configs
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/install_natron_pacman_repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

NATRON_DIR=
NATRON_REPO_DIR=
if [[ -z $1 || -z $2 ]]; then
echo "Usage: $(basename $0) <natron_directory> <natron_repo_directory>"
exit 1
else
NATRON_DIR=$(realpath $1)
NATRON_REPO_DIR=$(realpath $2)
fi

source ${NATRON_DIR}/tools/MINGW-packages/natron_repo_common.sh

if [[ ! -d ${NATRON_REPO_DIR} ]]; then
mkdir ${NATRON_REPO_DIR}
fi

cd ${NATRON_REPO_DIR}

WINDOWS_PACMAN_REPO_VERSION=`cat ${NATRON_DIR}/tools/MINGW-packages/windows_pacman_repo_version.txt`
ZIP_FILENAME="natron_package_repo-${WINDOWS_PACMAN_REPO_VERSION}.zip"
wget https://github.com/NatronGitHub/Natron/releases/download/windows-mingw-package-repo/${ZIP_FILENAME}

if [[ -e ${ZIP_FILENAME} ]]; then
unzip ${ZIP_FILENAME}
else
echo "Failed to fetch ${ZIP_FILENAME}"

echo "Building pacman repo locally."

# install necessary dependencies for building pacman repo.
pacman -S --needed --noconfirm git base-devel

${NATRON_DIR}/tools/MINGW-packages/build_natron_package_repo.sh ${NATRON_REPO_DIR}
fi

UNIX_NATRON_REPO_DIR=`cygpath -u ${NATRON_REPO_DIR}`
natron_repo_init ${UNIX_NATRON_REPO_DIR}
8 changes: 4 additions & 4 deletions tools/MINGW-packages/build_natron_package_repo.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
#set -x
CWD=$(pwd)
BUILD_SCRIPT_DIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))

PKGS="
mingw-w64-natron-setup
Expand All @@ -21,7 +21,7 @@ mingw-w64-dump_syms
mingw-w64-natron-build-deps-qt5
"

source ./natron_repo_common.sh
source "${BUILD_SCRIPT_DIR}/natron_repo_common.sh"

trap natron_repo_cleanup EXIT

Expand All @@ -37,7 +37,7 @@ natron_repo_init ${NATRON_REPO_DIR}

for pkg_dir in ${PKGS}; do
echo -e "\n\nEntering package directory ${pkg_dir}."
cd "${CWD}/${pkg_dir}"
cd "${BUILD_SCRIPT_DIR}/${pkg_dir}"

PACKAGE_NAME=`makepkg --printsrcinfo | awk '/pkgname/{print $3}'`

Expand Down Expand Up @@ -71,5 +71,5 @@ for pkg_dir in ${PKGS}; do
fi

echo -e "Leaving package directory ${pkg_dir}."
cd "${CWD}"
cd "${BUILD_SCRIPT_DIR}"
done
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ depends=(
# installer
"zip"
"unzip"
"${MINGW_PACKAGE_PREFIX}-firebird2-git"
"${MINGW_PACKAGE_PREFIX}-firebird"
"${MINGW_PACKAGE_PREFIX}-breakpad-git"
"${MINGW_PACKAGE_PREFIX}-python-sphinx"
"${MINGW_PACKAGE_PREFIX}-python-sphinx_rtd_theme"
Expand Down
1 change: 1 addition & 0 deletions tools/MINGW-packages/windows_pacman_repo_version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20240120-1