Skip to content

Commit 4bb9565

Browse files
authored
Custom Worker
1 parent 6d51b54 commit 4bb9565

File tree

1 file changed

+1
-35
lines changed

1 file changed

+1
-35
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
arch: arm64
2626
name: mac
2727
# TODO It seems arm64 is not available yet (2024-11)
28-
- os: ubuntu-latest
28+
- os: ARM64
2929
arch: arm64
3030
name: linux
3131
# TODO Need some tweaks to run sbt on Windows
@@ -40,14 +40,6 @@ jobs:
4040
- uses: actions/checkout@v4
4141
with:
4242
path: local
43-
44-
- name: Local Patches for Library -x
45-
if: false
46-
run: |
47-
cp local/_patches/WvcMain.scala wvc/src/main/scala/wvlet/lang/native/WvcMain.scala
48-
cp local/_patches/WvcLib.scala wvc/src/main/scala/wvlet/lang/native/WvcLib.scala
49-
cp local/_patches/Makefile wvc-lib/Makefile
50-
cp local/_patches/build.sbt build.sbt
5143

5244
- uses: actions/setup-java@v4
5345
with:
@@ -61,7 +53,6 @@ jobs:
6153
echo "SCALA_VERSION=$SCALA_VERSION" >> $GITHUB_ENV
6254
6355
- name: Build native libraries for ${{ matrix.name }}-${{ matrix.arch }}
64-
if: ${{ !(matrix.name == 'linux' && matrix.arch == 'arm64') }}
6556
run: |
6657
./sbt 'wvcLib/nativeLink'
6758
./sbt 'wvcLibStatic/nativeLink'
@@ -71,31 +62,6 @@ jobs:
7162
cp $FILEPATH ./out/
7263
cd ./out && for f in *.*; do mv -- "$f" "${{ matrix.name }}-${{ matrix.arch }}_$f"; done
7364
ls -alFh
74-
75-
- name: Docker Setup QEMU
76-
if: ${{ matrix.name == 'linux' && matrix.arch == 'arm64' }}
77-
uses: docker/setup-qemu-action@v2
78-
with:
79-
platforms: arm64
80-
81-
- name: Re-Build native libraries in ARM64-emulated environment
82-
if: ${{ matrix.name == 'linux' && matrix.arch == 'arm64' }}
83-
run: |
84-
docker run --rm -v $(pwd):/${{ github.workspace }} -w ${{ github.workspace }} --platform linux/${{ matrix.arch }} arm64v8/ubuntu:oracular /bin/bash -c "
85-
apt-get update && apt-get install ca-certificates apt-transport-https curl gnupg build-essential -yqq &&
86-
echo 'deb https://repo.scala-sbt.org/scalasbt/debian all main' | tee /etc/apt/sources.list.d/sbt.list &&
87-
echo 'deb https://repo.scala-sbt.org/scalasbt/debian /' | tee /etc/apt/sources.list.d/sbt_old.list &&
88-
curl -sL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823' | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import &&
89-
chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg &&
90-
apt-get update &&
91-
apt-get install -y openjdk-23-jdk-headless sbt clang libstdc++-12-dev libgc-dev zlib1g-dev libssl-dev &&
92-
./sbt 'wvcLib/nativeLink' &&
93-
./sbt 'wvcLibStatic/nativeLink' &&
94-
FILEPATH=$(find . -name 'libwvlet.*') && echo $FILEPATH &&
95-
mkdir -p out &&
96-
cp $FILEPATH ./out/ &&
97-
cd ./out && for f in *.*; do mv -- \"\$f\" \"linux-arm64_\$f\"; done &&
98-
ls -alFh"
9965
10066
- name: Upload native libraries for ${{ matrix.name }}-${{ matrix.arch }}
10167
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)