GitHub workflow updated
This commit is contained in:
parent
9c8185545d
commit
4fec5287ea
|
@ -27,7 +27,8 @@ env:
|
||||||
# it has a bug in the install_name_tool. So explicitly use 12.3
|
# it has a bug in the install_name_tool. So explicitly use 12.3
|
||||||
# instead.
|
# instead.
|
||||||
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer
|
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer
|
||||||
|
CONAN_USER_HOME: "${{ github.workspace }}/conan-home/"
|
||||||
|
CONAN_USER_HOME_SHORT: "${{ github.workspace }}/conan-home/short"
|
||||||
#
|
#
|
||||||
# Define our job(s)
|
# Define our job(s)
|
||||||
#
|
#
|
||||||
|
@ -69,45 +70,31 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
# with:
|
# with:
|
||||||
# ref: master
|
# ref: master
|
||||||
|
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
# SHARED: Retrieve git hashes and set up for cache
|
# SHARED: Checkout source
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
- name: Setup cache
|
- name: Calculate short hash
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# Get latest wxWidgets commit hash
|
|
||||||
wxhash=$(git ls-remote "${WXURL}" "${WXREF}" | awk 'NR==1 {print $1}')
|
|
||||||
|
|
||||||
# Build the cache key
|
|
||||||
wxhash="wx_${wxhash}_${RUNNER_OS}_${{matrix.config.platform}}"
|
|
||||||
|
|
||||||
# Export the commit hash to further steps
|
|
||||||
echo "WXHASH=${wxhash}" >> ${GITHUB_ENV}
|
|
||||||
|
|
||||||
# Get the short hash
|
# Get the short hash
|
||||||
shorthash=$(git show -s --format='%h')
|
shorthash=$(git show -s --format='%h')
|
||||||
|
|
||||||
# Export the short hash for the upload step
|
# Export the short hash for the upload step
|
||||||
echo "SHORTHASH=${shorthash}" >> ${GITHUB_ENV}
|
echo "SHORTHASH=${shorthash}" >> ${GITHUB_ENV}
|
||||||
|
|
||||||
# Export the destination directory name
|
# Export the destination directory name
|
||||||
echo "DEST=${{matrix.config.name}}_${shorthash}" >> ${GITHUB_ENV}
|
echo "DEST=${{matrix.config.name}}_${shorthash}" >> ${GITHUB_ENV}
|
||||||
|
|
||||||
# =========================================================================
|
- name: GitHub Action Cache for .conan
|
||||||
# SHARED: Create and/or retrieve wxWidgets cached build
|
id: github-cache-conan
|
||||||
# =========================================================================
|
uses: actions/cache@v2
|
||||||
- name: Populate cache
|
env:
|
||||||
id: cache
|
cache-name: cache-conan-modules
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
with:
|
||||||
# Increment the number at the end to force recreation of the cache
|
path: ${{ env.CONAN_USER_HOME }}
|
||||||
key: ${{ env.WXHASH }}.2
|
key: host-${{ matrix.config.name }}-${{ hashFiles('cmake-proxies/CMakeLists.txt') }}
|
||||||
path: ${{ env.WXWIN }}
|
restore-keys: |
|
||||||
|
host-${{ matrix.config.name }}-
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
# WINDOWS: Build (for all versions of Windows)
|
# WINDOWS: Build (for all versions of Windows)
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
@ -116,48 +103,15 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
|
pip install conan
|
||||||
# Build wxWidgets if needed
|
conan --version
|
||||||
if [ ! -e "${WXWIN}" ]
|
|
||||||
then
|
|
||||||
# Clone the wxWidgets repo
|
|
||||||
git clone --depth 1 --recurse-submodules -b "${WXREF}" "${WXURL}" "wxroot"
|
|
||||||
|
|
||||||
# Use cmake since it defines the MSVC environment for us
|
|
||||||
cmake -S "wxroot" \
|
|
||||||
-B "wxroot" \
|
|
||||||
-G "${{matrix.config.generator}}" \
|
|
||||||
-A "${{matrix.config.platform}}"
|
|
||||||
|
|
||||||
# Build
|
|
||||||
cmake --build "wxroot" --config Release --verbose
|
|
||||||
|
|
||||||
# Install to the cached path
|
|
||||||
cmake --install "wxroot" --config Release --prefix "${WXWIN}"
|
|
||||||
|
|
||||||
# On Windows, we need zlib for libid3tag
|
|
||||||
mkdir -p "${WXWIN}/src"
|
|
||||||
cp -a "wxroot/lib" "${WXWIN}/"
|
|
||||||
cp -a "wxroot/src/zlib" "${WXWIN}/src"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Convert to CMake path
|
|
||||||
export WXWIN="${WXWIN//\\//}"
|
|
||||||
|
|
||||||
# Configure Audacity
|
# Configure Audacity
|
||||||
#
|
#
|
||||||
# The wxWidgets_USE_REL_AND_DBG is needed because,
|
|
||||||
# on Github, we only build the Release version of
|
|
||||||
# wxWidgets and the FindwxWidgets CMake module
|
|
||||||
# defaults to looking for both. If either of them
|
|
||||||
# isn't found, then it doesn't provided the required
|
|
||||||
# library information. This is only a concern for
|
|
||||||
# Windows.
|
|
||||||
cmake -S . \
|
cmake -S . \
|
||||||
-B build \
|
-B build \
|
||||||
-G "${{matrix.config.generator}}" \
|
-G "${{matrix.config.generator}}" \
|
||||||
-A ${{matrix.config.platform}} \
|
-A ${{matrix.config.platform}} \
|
||||||
-D wxWidgets_USE_REL_AND_DBG=no \
|
|
||||||
-D audacity_use_pch=no
|
-D audacity_use_pch=no
|
||||||
|
|
||||||
# Build Audacity
|
# Build Audacity
|
||||||
|
@ -188,51 +142,13 @@ jobs:
|
||||||
brew install gettext
|
brew install gettext
|
||||||
brew link --force gettext
|
brew link --force gettext
|
||||||
|
|
||||||
# Build wxWidgets if needed
|
brew install conan
|
||||||
if [ ! -e "${WXWIN}" ]
|
conan --version
|
||||||
then
|
|
||||||
# Clone the wxWidgets repo
|
|
||||||
git clone --depth 1 --recurse-submodules -b "${WXREF}" "${WXURL}" "wxroot"
|
|
||||||
|
|
||||||
# Make sure our flags are included
|
|
||||||
export CXX="g++ -std=c++1z -stdlib=libc++"
|
|
||||||
export LD="g++ -std=c++1z -stdlib=libc++"
|
|
||||||
|
|
||||||
# The cmake build produces an incorrect wx-config script, so use
|
|
||||||
# the plain old configure/make
|
|
||||||
cd wxroot
|
|
||||||
./configure --prefix=/usr/local \
|
|
||||||
--enable-debug=no \
|
|
||||||
--enable-macosx-arch="x86_64" \
|
|
||||||
--enable-shared=yes \
|
|
||||||
--enable-unicode=yes \
|
|
||||||
--enable-universal_binary=no \
|
|
||||||
--enable-webkit=no \
|
|
||||||
--enable-webviewwebkit=no \
|
|
||||||
--with-expat=builtin \
|
|
||||||
--with-flavour="release" \
|
|
||||||
--with-libjpeg=builtin \
|
|
||||||
--with-libpng=builtin \
|
|
||||||
--with-libtiff=builtin \
|
|
||||||
--with-macosx-version-min="10.7" \
|
|
||||||
--with-regex=builtin \
|
|
||||||
--with-zlib=builtin \
|
|
||||||
--without-liblzma
|
|
||||||
|
|
||||||
# Build and install to cached path
|
|
||||||
make -j $(sysctl -n hw.ncpu) install DESTDIR="${WXWIN}"
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
# Clean up
|
|
||||||
unset CXX LD
|
|
||||||
fi
|
|
||||||
|
|
||||||
# "Install" wxWidgets
|
|
||||||
sudo cp -a "${WXWIN}"/usr/* /usr
|
|
||||||
|
|
||||||
# Configure Audacity
|
# Configure Audacity
|
||||||
cmake -S . \
|
cmake -S . \
|
||||||
-B build \
|
-B build \
|
||||||
|
-T buildsystem=1 \
|
||||||
-G "${{matrix.config.generator}}" \
|
-G "${{matrix.config.generator}}" \
|
||||||
-D audacity_use_pch=no
|
-D audacity_use_pch=no
|
||||||
|
|
||||||
|
@ -261,30 +177,13 @@ jobs:
|
||||||
|
|
||||||
# Install required packages
|
# Install required packages
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y libgtk2.0-dev libasound2-dev gettext
|
sudo apt-get install -y libgtk2.0-dev libasound2-dev gettext python3-pip
|
||||||
sudo apt-get remove -y ccache
|
sudo apt-get remove -y ccache
|
||||||
|
|
||||||
# Build wxWidgets if needed
|
pip3 install wheel setuptools
|
||||||
if [ ! -e "${WXWIN}" ]
|
pip3 install conan
|
||||||
then
|
|
||||||
# Clone the wxWidgets repo
|
|
||||||
git clone --depth 1 --recurse-submodules -b "${WXREF}" "${WXURL}" "wxroot"
|
|
||||||
|
|
||||||
# Install additional required package
|
conan --version
|
||||||
sudo apt-get install -y autoconf automake
|
|
||||||
|
|
||||||
# The cmake build produces an incorrect wx-config script, so use
|
|
||||||
# the plain old configure
|
|
||||||
cd wxroot
|
|
||||||
./configure --with-gtk
|
|
||||||
|
|
||||||
# Build and install to cached path
|
|
||||||
make -j $(nproc) install DESTDIR="${WXWIN}"
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
|
|
||||||
# "Install" wxWidgets
|
|
||||||
sudo cp -a "${WXWIN}"/* /
|
|
||||||
|
|
||||||
# Configure Audacity
|
# Configure Audacity
|
||||||
cmake -S . \
|
cmake -S . \
|
||||||
|
|
Loading…
Reference in New Issue