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

fix github action build for all platforms #957

Merged
merged 4 commits into from
Oct 14, 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
50 changes: 33 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
pull_request:
branches:
- 1.8

env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
release:
if: github.event.inputs.release == 'True'
Expand All @@ -39,17 +43,23 @@ jobs:
runs-on: ubuntu-latest
container: centos:7
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: icedtea-web

- name: Fix mirrors to use vault.centos.org
run: |
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo

- name: Install Dependencies
run: |
yum -y install autoconf bind-utils bzip2 cpio elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel \
gmp-devel java-1.8.0-openjdk-devel libcurl-devel make mpfr-devel perl unzip which zip
curl -o tagsoup.jar "https://repo1.maven.org/maven2/org/ccil/cowan/tagsoup/tagsoup/1.2.1/tagsoup-1.2.1.jar"
sha256sum tagsoup.jar | awk '$1!="ac97f7b4b1d8e9337edfa0e34044f8d0efe7223f6ad8f3a85d54cc1018ea2e04"{exit 1}'
curl -o rhino.zip "https://mediacdn.prod.productdelivery.prod.webservices.mozgcp.net/pub/js/rhino1_6R7.zip"
curl -o rhino.zip "https://ftp.mozilla.org/pub/js/rhino1_6R7.zip"
sha256sum rhino.zip | awk '$1!="c94c6de3a29b3acbc4eee732e688f75a5d94bd02c9878be4ceb4d3cd220f3866"{exit 1}'
unzip -j rhino.zip "*/js.jar"

Expand Down Expand Up @@ -114,7 +124,7 @@ jobs:
sha256sum "$zip" > "$zip.sha256.txt"
done

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: icedtea-web_build_x86-64_linux
path: |
Expand Down Expand Up @@ -149,10 +159,16 @@ jobs:
runs-on: ubuntu-latest
container: centos:7
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: icedtea-web

- name: Fix mirrors to use vault.centos.org
run: |
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo

- name: Install Dependencies
run: |
yum -y install autoconf bind-utils bzip2 cpio elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel \
Expand All @@ -161,7 +177,7 @@ jobs:
sha256sum tagsoup.jar | awk '$1!="ac97f7b4b1d8e9337edfa0e34044f8d0efe7223f6ad8f3a85d54cc1018ea2e04"{exit 1}'
curl -o mslinks.jar "https://repo1.maven.org/maven2/com/github/vatbub/mslinks/1.0.5/mslinks-1.0.5.jar"
sha256sum mslinks.jar | awk '$1!="e14d756f81b310b75baeb5baf219d25592b6a8635eb215c4059f17493b0cea5c"{exit 1}'
curl -o rhino.zip "https://mediacdn.prod.productdelivery.prod.webservices.mozgcp.net/pub/js/rhino1_6R7.zip"
curl -o rhino.zip "https://ftp.mozilla.org/pub/js/rhino1_6R7.zip"
sha256sum rhino.zip | awk '$1!="c94c6de3a29b3acbc4eee732e688f75a5d94bd02c9878be4ceb4d3cd220f3866"{exit 1}'
unzip -j rhino.zip "*/js.jar"

Expand Down Expand Up @@ -216,7 +232,7 @@ jobs:
sha256sum "$zip_rename" > "$zip_rename.sha256.txt"
done

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: icedtea-web_build_x86-64_portable
path: |
Expand Down Expand Up @@ -250,24 +266,24 @@ jobs:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: icedtea-web

- name: Install Dependencies
run: |
brew install autoconf automake coreutils freetype gnu-sed rust
brew install autoconf automake coreutils gnu-sed rust
curl -o tagsoup.jar "https://repo1.maven.org/maven2/org/ccil/cowan/tagsoup/tagsoup/1.2.1/tagsoup-1.2.1.jar"
sha256sum tagsoup.jar | awk '$1!="ac97f7b4b1d8e9337edfa0e34044f8d0efe7223f6ad8f3a85d54cc1018ea2e04"{exit 1}'
curl -o rhino.zip "https://mediacdn.prod.productdelivery.prod.webservices.mozgcp.net/pub/js/rhino1_6R7.zip"
curl -o rhino.zip "https://ftp.mozilla.org/pub/js/rhino1_6R7.zip"
sha256sum rhino.zip | awk '$1!="c94c6de3a29b3acbc4eee732e688f75a5d94bd02c9878be4ceb4d3cd220f3866"{exit 1}'
unzip -j rhino.zip "*/js.jar"

- name: Build
run: |
export ICEDTEAWEB_INSTALL="/icedtea-web-image"
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin/:/usr/local/opt/coreutils/bin/:$PATH"
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
export JAVA_HOME=$(/usr/libexec/java_home -v 11)
export TAGSOUP="${PWD}/tagsoup.jar"
export RHINO="${PWD}/js.jar"
export ACLOCAL_PATH="/usr/local/share/aclocal"
Expand All @@ -277,7 +293,7 @@ jobs:
echo "Invoking autogen.sh"
./autogen.sh
echo "Incoking IcedTea-Web configure"
./configure --disable-native-plugin --prefix="${ICEDTEAWEB_INSTALL}" --with-itw-libs=BUNDLED --with-rhino="${RHINO}" --with-tagsoup="${TAGSOUP}" --with-jdk-home="${JAVA_HOME}" --with-jre-home="${JAVA_HOME}/jre"
./configure --disable-native-plugin --disable-pluginjar --prefix="${ICEDTEAWEB_INSTALL}" --with-itw-libs=BUNDLED --with-rhino="${RHINO}" --with-tagsoup="${TAGSOUP}" --with-jdk-home="${JAVA_HOME}" --with-jre-home="${JAVA_HOME}"
echo "Build IcedTea-Web"
make DESTDIR="${WORKSPACE}"

Expand All @@ -292,7 +308,7 @@ jobs:
sha256sum "$zip" > "$zip.sha256.txt"
done

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: icedtea-web_build_x86-64_macos
path: |
Expand Down Expand Up @@ -328,7 +344,7 @@ jobs:
steps:
- name: Restore cygwin packages from cache
id: cygwin
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: C:\cygwin_packages
key: cygwin-packages-${{ runner.os }}-v1
Expand Down Expand Up @@ -361,7 +377,7 @@ jobs:
shell: bash
run: mkdir $HOME && git config --system core.autocrlf false && git config --system --add safe.directory '*'

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
set-safe-directory: false

Expand Down Expand Up @@ -391,7 +407,7 @@ jobs:
exit 1
}
# Retrieve Rhino
Invoke-WebRequest -UseBasicParsing 'https://ftp.mozilla.org/pub/mozilla.org/js/rhino1_6R7.zip' -OutFile 'rhino1_6R7.zip'
Invoke-WebRequest -UseBasicParsing 'https://ftp.mozilla.org/pub/js/rhino1_6R7.zip' -OutFile 'rhino1_6R7.zip'
$checksum = (Get-FileHash -Algorithm SHA256 'rhino1_6R7.zip' | Select-Object -ExpandProperty Hash)
If ($checksum -ne "C94C6DE3A29B3ACBC4EEE732E688F75A5D94BD02C9878BE4CEB4D3CD220F3866") {
Write-Host "Checksums did not match!"
Expand All @@ -413,14 +429,14 @@ jobs:
run: |
fsutil behavior set disable8dot3 0
cmd /c dir /x "C:\Program Files (x86)"
fsutil file setshortname "C:\Program Files (x86)\WiX Toolset v3.11" "WIXTOO~1.14"
fsutil file setshortname "C:\Program Files (x86)\WiX Toolset v3.14" "WIXTOO~1.14"
shell: cmd

- name: Build
run: bash .github/workflows/windows_build.sh
shell: cmd

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: icedtea-web_build_x86-64_win
path: |
Expand Down
6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -819,10 +819,10 @@ netx-source-files.txt:
find $(NETX_SRCDIR) -name '*.java' | sort > $@ ; \
for src in $(NETX_EXCLUDE_SRCS) ; \
do \
sed -i "/$${src}/ d" $@ ; \
sed -i.bak "/$${src}/ d" $@ && rm [email protected] ; \
done
if !WITH_RHINO
sed -i '/RhinoBasedPacEvaluator/ d' $@
sed -i.bak '/RhinoBasedPacEvaluator/ d' $@ && rm [email protected]
endif

# if 'sed' will be missing on machine, use old IFS hack as on other places
Expand Down Expand Up @@ -905,7 +905,7 @@ stamps/generate-docs.stamp: stamps/netx.stamp
echo "<body><h3>$(PLUGIN_VERSION) docs:</h3>" >> "$$HTML_DOCS_INDEX" ; \
for LANG_ID in en_US.UTF-8 cs_CZ.UTF-8 pl_PL.UTF-8 de_DE.UTF-8 ; do \
ID=`echo "$$LANG_ID" | head -c 2` ; \
ENCOD=`echo "$$LANG_ID" | tail -c 6 -` ; \
ENCOD=`echo "$$LANG_ID" | tail -c 6` ; \
export LANG=$$LANG_ID; \
mkdir "$$HTML_DOCS_TARGET_DIR/$$ID" ; \
echo "<li><a href='$$ID/icedtea-web.html'>$$LANG_ID</a></li>" >> "$$HTML_DOCS_INDEX" ; \
Expand Down
25 changes: 13 additions & 12 deletions html-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,16 @@ print_debug "Starting sed substitutions"
for FILE in NEWS AUTHORS COPYING ChangeLog
do
print_debug "Processing $FILE..."
sed -i -r 's/\t/ /g' "./$FILE" # Convert tabs into four spaces
sed -i -r 's/\&/\&amp;/g' "./$FILE" # "&" -> "&amp;"
sed -i -r 's/ /\&ensp;\&ensp;/g' "./$FILE" # Double-spaces into HTML whitespace for format preservation
sed -i -r 's/</\&lt;/g' "./$FILE" # "<" -> "&lt;"
sed -i -r 's/>/\&gt;/g' "./$FILE" # ">" -> "&gt;"
sed -i -r 's_(\&lt;)?(https?://[^ ]*)(\&gt;| |$)_\1<a href="\2">\2</a>\3_i' "./$FILE" # Create hyperlinks from http(s) URLs
sed -i -r 's/\&lt;(.*@.*)\&gt;/\&lt;<a href="mailto:\1\?subject=IcedTea-Web">\1<\/a>\&gt;/i' "./$FILE" # Create mailto links from email addresses formatted as <[email protected]>
sed -i -r 's/$/<br>/' "./$FILE" # "\n" -> "<br>"
sed -i '1i <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head>' "./$FILE"
sed -i.bak -r 's/\t/ /g' "./$FILE" && rm "./$FILE.bak" # Convert tabs into four spaces
sed -i.bak -r 's/\&/\&amp;/g' "./$FILE" && rm "./$FILE.bak" # "&" -> "&amp;"
sed -i.bak -r 's/ /\&ensp;\&ensp;/g' "./$FILE" && rm "./$FILE.bak" # Double-spaces into HTML whitespace for format preservation
sed -i.bak -r 's/</\&lt;/g' "./$FILE" && rm "./$FILE.bak" # "<" -> "&lt;"
sed -i.bak -r 's/>/\&gt;/g' "./$FILE" && rm "./$FILE.bak" # ">" -> "&gt;"
sed -i.bak -r -e 's_(\&lt;)?(https?://[^ ]*)(\&gt;| )_\1<a href="\2">\2</a>\3_i' \
-e '/<a href=/! s_(\&lt;)?(https?://[^ ]*)($)_\1<a href="\2">\2</a>\3_i' "./$FILE" && rm "./$FILE.bak" # Create hyperlinks from http(s) URLs
sed -i.bak -r 's/\&lt;(.*@.*)\&gt;/\&lt;<a href="mailto:\1\?subject=IcedTea-Web">\1<\/a>\&gt;/i' "./$FILE" && rm "./$FILE.bak" # Create mailto links from email addresses formatted as <[email protected]>
sed -i.bak -r 's/$/<br>/' "./$FILE" && rm "./$FILE.bak" # "\n" -> "<br>"
sed -i.bak $'1i\\\n<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head>\n' "./$FILE" && rm "./$FILE.bak"

mv "$FILE" "$FILE.html"
print_debug "$FILE.html finished."
Expand All @@ -105,9 +106,9 @@ done
print_debug "Done sed subs. Starting in-place additions"

# Centre the column of author names in the Authors file
sed -i '5i <center>' AUTHORS.html
sed -i.bak $'5i\\\n<center>\n' AUTHORS.html && rm AUTHORS.html.bak
# Insert jamIcon above author names
sed -i '6i <br><img src="jamIcon.jpg" alt="Jam Icon" width="87" height="84"><br><br>' AUTHORS.html
sed -i.bak $'6i\\\n<br><img src="jamIcon.jpg" alt="Jam Icon" width="87" height="84"><br><br>\n' AUTHORS.html && rm AUTHORS.html.bak
echo "</center>" >> AUTHORS.html

if [ -n "${REPO_URL}" ]; then
Expand Down Expand Up @@ -168,7 +169,7 @@ do
print_debug "$FILE finished"
done

sed -i -r 's|(\*\ .*):|<u>\1</u>:|' ChangeLog.html # Underline changed files in ChangeLog, eg "* Makefile.am:"
sed -i.bak -r 's|(\*\ .*):|<u>\1</u>:|' ChangeLog.html && rm ChangeLog.html.bak # Underline changed files in ChangeLog, eg "* Makefile.am:"

end_time="$(date +%s.%N)"

Expand Down
2 changes: 1 addition & 1 deletion rust-launcher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ authors = ["https://icedtea.classpath.org/wiki/IcedTea-Web"]

[dependencies]
[target.'cfg(windows)'.dependencies]
dunce = "0.1.1"
dunce = "1.0.0"
Loading