Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/b8630492eae3b14ea3a9cd5c615767077e261f56
...commit
http://git.netsurf-browser.org/netsurf.git/commit/b8630492eae3b14ea3a9cd5c615767077e261f56
...tree
http://git.netsurf-browser.org/netsurf.git/tree/b8630492eae3b14ea3a9cd5c615767077e261f56
The branch, master has been updated
via b8630492eae3b14ea3a9cd5c615767077e261f56 (commit)
via 7bf6f8d0a22920e162e43234dc5b280024fc82e6 (commit)
via 71a683438dfa8960204c693fe795b834a7ccf963 (commit)
via a04f2c154ba95bcd2857fb41127b3ea02b3c2d87 (commit)
via 6ebb370a86c8f0bb1bc8fce10adb85fc1776f37f (commit)
from 408080d5513460dc2b14d7753b50df3c87a9c6c3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=b8630492eae3b14ea3a9cd5c615767077e261f56
commit b8630492eae3b14ea3a9cd5c615767077e261f56
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
ci: cross: Dump toolchain testament into log
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index e0b475a7e..4aeac684c 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -205,7 +205,8 @@ jobs:
echo "Installing toolchain: ${{ matrix.build.toolchain }}"
sudo tar -xzf "${{ matrix.build.toolchain }}.tar.gz" -C /
rm "${{ matrix.build.toolchain }}.tar.gz"
- ls -la /opt/netsurf/
+ echo "Toolchain testament:"
+ cat /opt/netsurf/${{ matrix.build.toolchain }}/BUILD_INFO.txt
- name: Build and install project libs
env:
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=7bf6f8d0a22920e162e43234dc5b280024fc82e6
commit 7bf6f8d0a22920e162e43234dc5b280024fc82e6
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
ci: Clone same branch for deps if available
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index b2d947965..e0b475a7e 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -61,7 +61,7 @@ jobs:
TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
run: |
source docs/env.sh
- ns-clone -d -s
+ ns-clone -d -s -b ${GITHUB_REF_NAME}
ns-make-tools install
ns-make-libs install
@@ -241,7 +241,7 @@ jobs:
echo "USE_CPUS=$USE_CPUS"
echo "Cloning libs..."
- ns-clone -d -s
+ ns-clone -d -s -b ${GITHUB_REF_NAME}
echo "Building and installing tools..."
ns-make-tools install
echo "Building and installing libs..."
diff --git a/.github/workflows/monkey-test.yaml
b/.github/workflows/monkey-test.yaml
index 8ed2b74b0..b098fb0dc 100644
--- a/.github/workflows/monkey-test.yaml
+++ b/.github/workflows/monkey-test.yaml
@@ -50,7 +50,7 @@ jobs:
run: |
export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
- ns-clone -d -s
+ ns-clone -d -s -b ${GITHUB_REF_NAME}
ns-make-tools install
ns-make-libs install
diff --git a/.github/workflows/static-analysis.yaml
b/.github/workflows/static-analysis.yaml
index 2500b3f57..25d055d32 100644
--- a/.github/workflows/static-analysis.yaml
+++ b/.github/workflows/static-analysis.yaml
@@ -45,7 +45,7 @@ jobs:
run: |
export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
- ns-clone -d -s
+ ns-clone -d -s -b ${GITHUB_REF_NAME}
ns-make-tools install
ns-make-libs install
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=71a683438dfa8960204c693fe795b834a7ccf963
commit 71a683438dfa8960204c693fe795b834a7ccf963
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
env.sh: Add ns-clone option to take a branch name
diff --git a/docs/env.sh b/docs/env.sh
index d2f8f2194..eb00d721c 100644
--- a/docs/env.sh
+++ b/docs/env.sh
@@ -426,6 +426,7 @@ ns-clone()
{
SHALLOW=""
SKIP=""
+ BRANCH=""
while [ $# -gt 0 ]
do
case "$1" in
@@ -435,6 +436,9 @@ ns-clone()
-s | --shallow) SHALLOW="--depth 1"
shift
;;
+ -b | --branch) BRANCH="$2"
+ shift 2
+ ;;
-*) echo "Error: Unknown option: $1" >&2
exit 1
;;
@@ -447,11 +451,22 @@ ns-clone()
mkdir -p ${TARGET_WORKSPACE}
for REPO in $(echo ${NS_BUILDSYSTEM} ${NS_INTERNAL_LIBS}
${NS_FRONTEND_LIBS} ${NS_RISCOS_LIBS} ${NS_TOOLS} ${BUILD_TARGET}) ; do
[ "x${REPO}" != "x${SKIP}" ] || continue
- echo -n " GIT: Cloning ${REPO}: "
+ echo -n " GIT: Cloning '${REPO}'; "
if [ -f ${TARGET_WORKSPACE}/${REPO}/.git/config ]; then
echo "Repository already present"
else
- (cd ${TARGET_WORKSPACE} && git clone ${SHALLOW}
${NS_GIT}/${REPO}.git; )
+ if [ "x${BRANCH}" != "x" ]; then
+ if (cd ${TARGET_WORKSPACE} && git clone ${SHALLOW} -b
${BRANCH} ${NS_GIT}/${REPO}.git 2>/dev/null); then
+ echo "got branch '${BRANCH}'"
+ continue
+ fi
+ fi
+ if (cd ${TARGET_WORKSPACE} && git clone ${SHALLOW}
${NS_GIT}/${REPO}.git); then
+ echo "default branch"
+ else
+ echo "failure"
+ return 1
+ fi
fi
done
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=a04f2c154ba95bcd2857fb41127b3ea02b3c2d87
commit a04f2c154ba95bcd2857fb41127b3ea02b3c2d87
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
ci: Use env for native TARGET_WORKSPACE
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index a056617f7..b2d947965 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -58,8 +58,8 @@ jobs:
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
run: |
- export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
ns-clone -d -s
ns-make-tools install
@@ -79,8 +79,8 @@ jobs:
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
run: |
- export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
make test
@@ -88,8 +88,8 @@ jobs:
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
run: |
- export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
make -j"$(nproc)" TARGET=gtk
@@ -97,8 +97,8 @@ jobs:
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
run: |
- export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
make -j"$(nproc)" TARGET=monkey
@@ -106,8 +106,8 @@ jobs:
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
run: |
- export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
make -j"$(nproc)" TARGET=framebuffer
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=6ebb370a86c8f0bb1bc8fce10adb85fc1776f37f
commit 6ebb370a86c8f0bb1bc8fce10adb85fc1776f37f
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
ci: Add cross builds
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index fa8843807..a056617f7 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -3,8 +3,9 @@ name: "Linux Build"
on: [push]
jobs:
- linux:
- name: '${{ matrix.os }}: ${{ matrix.compiler.vendor }}'
+ # Native linux builds
+ native:
+ name: 'Native: ${{ matrix.os }}: ${{ matrix.compiler.vendor }}'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -109,3 +110,182 @@ jobs:
export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
make -j"$(nproc)" TARGET=framebuffer
+
+ # Cross compile using toolchains built in the toolchains repo.
+ cross:
+ name: 'Cross: ${{ matrix.build.toolchain }}' # ATM toolchain unique across
builds
+ runs-on: ubuntu-24.04 # Matches toolchains workflow
+ strategy:
+ fail-fast: false
+ matrix:
+ build:
+ - { toolchain: arm-riscos-gnueabi, frontend: riscos, pkg-file:
netsurf.zip }
+ - { toolchain: arm-unknown-riscos, frontend: riscos, pkg-file:
netsurf.zip }
+ - { toolchain: i686-w64-mingw32, frontend: windows, pkg-file:
netsurf-installer.exe }
+ - { toolchain: m5475-atari-mint, frontend: atari, pkg-file:
nsv4e.zip }
+ - { toolchain: m68k-atari-mint, frontend: atari, pkg-file:
ns020.zip }
+ - { toolchain: m68k-unknown-amigaos, frontend: amigaos3, pkg-file:
NetSurf_Amiga/netsurf.lha }
+ - { toolchain: ppc-amigaos, frontend: amiga, pkg-file:
NetSurf_Amiga/netsurf.lha }
+ - { toolchain: x86_64-w64-mingw32, frontend: windows, pkg-file:
netsurf-installer.exe }
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+
+ - name: apt-get install packages
+ run: sudo apt-get update -qq &&
+ sudo apt-get install --no-install-recommends -y
+ bison
+ build-essential
+ ccache
+ check
+ clang
+ flex
+ git
+ gperf
+ jlha-utils
+ libcurl4-openssl-dev
+ libgtk-3-dev
+ libhtml-parser-perl
+ libjpeg-dev
+ libpng-dev
+ librsvg2-dev
+ llvm
+ nsis
+ pkg-config
+
+ - name: ccache
+ uses: hendrikmuhs/[email protected]
+ with:
+ key: ${{ github.job }}-${{ matrix.build.toolchain }}
+ max-size: 128M
+
+ # look for toolchain for this branch name first, then default to master
+ - name: Download toolchain
+ run: |
+ set -e
+
+ TOOLCHAIN_NAME="${{ matrix.build.toolchain }}"
+ BRANCH_NAME="${{ github.ref_name }}"
+
+ # Function to try downloading toolchain from a specific tag
+ download_toolchain() {
+ local ref="$1"
+ local
download_url="https://github.com/netsurf-browser/toolchains/releases/download/${ref}/${TOOLCHAIN_NAME}.tar.gz"
+
+ echo "Trying to download toolchain from ref: $ref"
+ echo "URL: $download_url"
+
+ if curl -f -L -o "${TOOLCHAIN_NAME}.tar.gz" "$download_url"; then
+ echo "Got toolchain with ref: $ref"
+ return 0
+ else
+ echo "Failed to download toolchain with ref: $ref"
+ return 1
+ fi
+ }
+
+ # Try branch-specific toolchain first
+ safe_branch=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9._-]/-/g')
+ branch_tag="gh-${safe_branch}-unstable"
+
+ if download_toolchain "$branch_tag"; then
+ echo "Downloaded branch-specific toolchain"
+ elif download_toolchain "gh-master-unstable"; then
+ echo "Downloaded fallback master toolchain"
+ else
+ echo "Failed to download any toolchain variant"
+ exit 1
+ fi
+
+ - name: Install toolchain
+ run: |
+ echo "Installing toolchain: ${{ matrix.build.toolchain }}"
+ sudo tar -xzf "${{ matrix.build.toolchain }}.tar.gz" -C /
+ rm "${{ matrix.build.toolchain }}.tar.gz"
+ ls -la /opt/netsurf/
+
+ - name: Build and install project libs
+ env:
+ HOST: "${{ matrix.build.toolchain }}"
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
+ Q:
+ run: |
+ echo "HOST=$HOST"
+ echo "TARGET_WORKSPACE=$TARGET_WORKSPACE"
+
+ echo "Looking for cross-compiler tools..."
+ echo "Expected path: /opt/netsurf/${HOST}/cross/bin/"
+ if [ -f "/opt/netsurf/${HOST}/cross/bin/${HOST}-gcc" ]; then
+ echo "Found: /opt/netsurf/${HOST}/cross/bin/${HOST}-gcc"
+ echo "Testing if it's executable:"
+ /opt/netsurf/${HOST}/cross/bin/${HOST}-gcc --version || echo "Failed
to execute gcc --version"
+ echo "Testing dumpmachine output:"
+ /opt/netsurf/${HOST}/cross/bin/${HOST}-gcc -dumpmachine || echo
"Failed to execute gcc -dumpmachine"
+ else
+ echo "NOT FOUND: /opt/netsurf/${HOST}/cross/bin/${HOST}-gcc"
+ fi
+
+ echo "Sourcing env.sh with error checking..."
+ set -e # Exit on any error
+ if ! source docs/env.sh; then
+ echo "env.sh failed with exit code $?"
+ exit 1
+ fi
+ echo "env.sh sourced successfully"
+ echo "BUILD=$BUILD"
+ echo "HOST=$HOST"
+ echo "TARGET_WORKSPACE=$TARGET_WORKSPACE"
+ echo "USE_CPUS=$USE_CPUS"
+
+ echo "Cloning libs..."
+ ns-clone -d -s
+ echo "Building and installing tools..."
+ ns-make-tools install
+ echo "Building and installing libs..."
+ ns-make-libs install
+
+ - name: Build NetSurf
+ env:
+ HOST: "${{ matrix.build.toolchain }}"
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
+ run: |
+ set -e
+ if ! source docs/env.sh; then
+ echo "env.sh failed with exit code $?"
+ exit 1
+ fi
+ echo "env.sh sourced successfully"
+ echo "BUILD=$BUILD"
+ echo "HOST=$HOST"
+ echo "TARGET_WORKSPACE=$TARGET_WORKSPACE"
+ echo "USE_CPUS=$USE_CPUS"
+ make -j"$(nproc)" TARGET=${{ matrix.build.frontend }} Q=
+
+ - name: Make package
+ env:
+ HOST: "${{ matrix.build.toolchain }}"
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
+ run: |
+ set -e
+ if ! source docs/env.sh; then
+ echo "env.sh failed with exit code $?"
+ exit 1
+ fi
+ echo "env.sh sourced successfully"
+ echo "BUILD=$BUILD"
+ echo "HOST=$HOST"
+ echo "TARGET_WORKSPACE=$TARGET_WORKSPACE"
+ echo "USE_CPUS=$USE_CPUS"
+ make package TARGET=${{ matrix.build.frontend }} Q=
+
+ # Can't avoid `upload-artifact` zipping the package
+ # https://github.com/actions/upload-artifact/issues/426
+ - name: Upload artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: ${{ matrix.build.toolchain }}-${{ matrix.build.frontend }}
+ path: ${{ matrix.build.pkg-file }}
+ compression-level: 0 # Avoid pointless recompression
-----------------------------------------------------------------------
Summary of changes:
.github/workflows/build.yaml | 197 +++++++++++++++++++++++++++++++--
.github/workflows/monkey-test.yaml | 2 +-
.github/workflows/static-analysis.yaml | 2 +-
docs/env.sh | 19 +++-
4 files changed, 208 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index fa8843807..4aeac684c 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -3,8 +3,9 @@ name: "Linux Build"
on: [push]
jobs:
- linux:
- name: '${{ matrix.os }}: ${{ matrix.compiler.vendor }}'
+ # Native linux builds
+ native:
+ name: 'Native: ${{ matrix.os }}: ${{ matrix.compiler.vendor }}'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -57,10 +58,10 @@ jobs:
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
run: |
- export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
- ns-clone -d -s
+ ns-clone -d -s -b ${GITHUB_REF_NAME}
ns-make-tools install
ns-make-libs install
@@ -78,8 +79,8 @@ jobs:
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
run: |
- export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
make test
@@ -87,8 +88,8 @@ jobs:
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
run: |
- export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
make -j"$(nproc)" TARGET=gtk
@@ -96,8 +97,8 @@ jobs:
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
run: |
- export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
make -j"$(nproc)" TARGET=monkey
@@ -105,7 +106,187 @@ jobs:
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
run: |
- export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
make -j"$(nproc)" TARGET=framebuffer
+
+ # Cross compile using toolchains built in the toolchains repo.
+ cross:
+ name: 'Cross: ${{ matrix.build.toolchain }}' # ATM toolchain unique across
builds
+ runs-on: ubuntu-24.04 # Matches toolchains workflow
+ strategy:
+ fail-fast: false
+ matrix:
+ build:
+ - { toolchain: arm-riscos-gnueabi, frontend: riscos, pkg-file:
netsurf.zip }
+ - { toolchain: arm-unknown-riscos, frontend: riscos, pkg-file:
netsurf.zip }
+ - { toolchain: i686-w64-mingw32, frontend: windows, pkg-file:
netsurf-installer.exe }
+ - { toolchain: m5475-atari-mint, frontend: atari, pkg-file:
nsv4e.zip }
+ - { toolchain: m68k-atari-mint, frontend: atari, pkg-file:
ns020.zip }
+ - { toolchain: m68k-unknown-amigaos, frontend: amigaos3, pkg-file:
NetSurf_Amiga/netsurf.lha }
+ - { toolchain: ppc-amigaos, frontend: amiga, pkg-file:
NetSurf_Amiga/netsurf.lha }
+ - { toolchain: x86_64-w64-mingw32, frontend: windows, pkg-file:
netsurf-installer.exe }
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+
+ - name: apt-get install packages
+ run: sudo apt-get update -qq &&
+ sudo apt-get install --no-install-recommends -y
+ bison
+ build-essential
+ ccache
+ check
+ clang
+ flex
+ git
+ gperf
+ jlha-utils
+ libcurl4-openssl-dev
+ libgtk-3-dev
+ libhtml-parser-perl
+ libjpeg-dev
+ libpng-dev
+ librsvg2-dev
+ llvm
+ nsis
+ pkg-config
+
+ - name: ccache
+ uses: hendrikmuhs/[email protected]
+ with:
+ key: ${{ github.job }}-${{ matrix.build.toolchain }}
+ max-size: 128M
+
+ # look for toolchain for this branch name first, then default to master
+ - name: Download toolchain
+ run: |
+ set -e
+
+ TOOLCHAIN_NAME="${{ matrix.build.toolchain }}"
+ BRANCH_NAME="${{ github.ref_name }}"
+
+ # Function to try downloading toolchain from a specific tag
+ download_toolchain() {
+ local ref="$1"
+ local
download_url="https://github.com/netsurf-browser/toolchains/releases/download/${ref}/${TOOLCHAIN_NAME}.tar.gz"
+
+ echo "Trying to download toolchain from ref: $ref"
+ echo "URL: $download_url"
+
+ if curl -f -L -o "${TOOLCHAIN_NAME}.tar.gz" "$download_url"; then
+ echo "Got toolchain with ref: $ref"
+ return 0
+ else
+ echo "Failed to download toolchain with ref: $ref"
+ return 1
+ fi
+ }
+
+ # Try branch-specific toolchain first
+ safe_branch=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9._-]/-/g')
+ branch_tag="gh-${safe_branch}-unstable"
+
+ if download_toolchain "$branch_tag"; then
+ echo "Downloaded branch-specific toolchain"
+ elif download_toolchain "gh-master-unstable"; then
+ echo "Downloaded fallback master toolchain"
+ else
+ echo "Failed to download any toolchain variant"
+ exit 1
+ fi
+
+ - name: Install toolchain
+ run: |
+ echo "Installing toolchain: ${{ matrix.build.toolchain }}"
+ sudo tar -xzf "${{ matrix.build.toolchain }}.tar.gz" -C /
+ rm "${{ matrix.build.toolchain }}.tar.gz"
+ echo "Toolchain testament:"
+ cat /opt/netsurf/${{ matrix.build.toolchain }}/BUILD_INFO.txt
+
+ - name: Build and install project libs
+ env:
+ HOST: "${{ matrix.build.toolchain }}"
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
+ Q:
+ run: |
+ echo "HOST=$HOST"
+ echo "TARGET_WORKSPACE=$TARGET_WORKSPACE"
+
+ echo "Looking for cross-compiler tools..."
+ echo "Expected path: /opt/netsurf/${HOST}/cross/bin/"
+ if [ -f "/opt/netsurf/${HOST}/cross/bin/${HOST}-gcc" ]; then
+ echo "Found: /opt/netsurf/${HOST}/cross/bin/${HOST}-gcc"
+ echo "Testing if it's executable:"
+ /opt/netsurf/${HOST}/cross/bin/${HOST}-gcc --version || echo "Failed
to execute gcc --version"
+ echo "Testing dumpmachine output:"
+ /opt/netsurf/${HOST}/cross/bin/${HOST}-gcc -dumpmachine || echo
"Failed to execute gcc -dumpmachine"
+ else
+ echo "NOT FOUND: /opt/netsurf/${HOST}/cross/bin/${HOST}-gcc"
+ fi
+
+ echo "Sourcing env.sh with error checking..."
+ set -e # Exit on any error
+ if ! source docs/env.sh; then
+ echo "env.sh failed with exit code $?"
+ exit 1
+ fi
+ echo "env.sh sourced successfully"
+ echo "BUILD=$BUILD"
+ echo "HOST=$HOST"
+ echo "TARGET_WORKSPACE=$TARGET_WORKSPACE"
+ echo "USE_CPUS=$USE_CPUS"
+
+ echo "Cloning libs..."
+ ns-clone -d -s -b ${GITHUB_REF_NAME}
+ echo "Building and installing tools..."
+ ns-make-tools install
+ echo "Building and installing libs..."
+ ns-make-libs install
+
+ - name: Build NetSurf
+ env:
+ HOST: "${{ matrix.build.toolchain }}"
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
+ run: |
+ set -e
+ if ! source docs/env.sh; then
+ echo "env.sh failed with exit code $?"
+ exit 1
+ fi
+ echo "env.sh sourced successfully"
+ echo "BUILD=$BUILD"
+ echo "HOST=$HOST"
+ echo "TARGET_WORKSPACE=$TARGET_WORKSPACE"
+ echo "USE_CPUS=$USE_CPUS"
+ make -j"$(nproc)" TARGET=${{ matrix.build.frontend }} Q=
+
+ - name: Make package
+ env:
+ HOST: "${{ matrix.build.toolchain }}"
+ TARGET_WORKSPACE: "${{ github.workspace }}/projects" # Same as
"$(pwd)/projects"
+ run: |
+ set -e
+ if ! source docs/env.sh; then
+ echo "env.sh failed with exit code $?"
+ exit 1
+ fi
+ echo "env.sh sourced successfully"
+ echo "BUILD=$BUILD"
+ echo "HOST=$HOST"
+ echo "TARGET_WORKSPACE=$TARGET_WORKSPACE"
+ echo "USE_CPUS=$USE_CPUS"
+ make package TARGET=${{ matrix.build.frontend }} Q=
+
+ # Can't avoid `upload-artifact` zipping the package
+ # https://github.com/actions/upload-artifact/issues/426
+ - name: Upload artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: ${{ matrix.build.toolchain }}-${{ matrix.build.frontend }}
+ path: ${{ matrix.build.pkg-file }}
+ compression-level: 0 # Avoid pointless recompression
diff --git a/.github/workflows/monkey-test.yaml
b/.github/workflows/monkey-test.yaml
index 8ed2b74b0..b098fb0dc 100644
--- a/.github/workflows/monkey-test.yaml
+++ b/.github/workflows/monkey-test.yaml
@@ -50,7 +50,7 @@ jobs:
run: |
export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
- ns-clone -d -s
+ ns-clone -d -s -b ${GITHUB_REF_NAME}
ns-make-tools install
ns-make-libs install
diff --git a/.github/workflows/static-analysis.yaml
b/.github/workflows/static-analysis.yaml
index 2500b3f57..25d055d32 100644
--- a/.github/workflows/static-analysis.yaml
+++ b/.github/workflows/static-analysis.yaml
@@ -45,7 +45,7 @@ jobs:
run: |
export TARGET_WORKSPACE="$(pwd)/projects"
source docs/env.sh
- ns-clone -d -s
+ ns-clone -d -s -b ${GITHUB_REF_NAME}
ns-make-tools install
ns-make-libs install
diff --git a/docs/env.sh b/docs/env.sh
index d2f8f2194..eb00d721c 100644
--- a/docs/env.sh
+++ b/docs/env.sh
@@ -426,6 +426,7 @@ ns-clone()
{
SHALLOW=""
SKIP=""
+ BRANCH=""
while [ $# -gt 0 ]
do
case "$1" in
@@ -435,6 +436,9 @@ ns-clone()
-s | --shallow) SHALLOW="--depth 1"
shift
;;
+ -b | --branch) BRANCH="$2"
+ shift 2
+ ;;
-*) echo "Error: Unknown option: $1" >&2
exit 1
;;
@@ -447,11 +451,22 @@ ns-clone()
mkdir -p ${TARGET_WORKSPACE}
for REPO in $(echo ${NS_BUILDSYSTEM} ${NS_INTERNAL_LIBS}
${NS_FRONTEND_LIBS} ${NS_RISCOS_LIBS} ${NS_TOOLS} ${BUILD_TARGET}) ; do
[ "x${REPO}" != "x${SKIP}" ] || continue
- echo -n " GIT: Cloning ${REPO}: "
+ echo -n " GIT: Cloning '${REPO}'; "
if [ -f ${TARGET_WORKSPACE}/${REPO}/.git/config ]; then
echo "Repository already present"
else
- (cd ${TARGET_WORKSPACE} && git clone ${SHALLOW}
${NS_GIT}/${REPO}.git; )
+ if [ "x${BRANCH}" != "x" ]; then
+ if (cd ${TARGET_WORKSPACE} && git clone ${SHALLOW} -b
${BRANCH} ${NS_GIT}/${REPO}.git 2>/dev/null); then
+ echo "got branch '${BRANCH}'"
+ continue
+ fi
+ fi
+ if (cd ${TARGET_WORKSPACE} && git clone ${SHALLOW}
${NS_GIT}/${REPO}.git); then
+ echo "default branch"
+ else
+ echo "failure"
+ return 1
+ fi
fi
done
--
NetSurf Browser