From 3764e2b791dde73767a41b1dbad1308524edb406 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 14:38:03 +0200 Subject: [PATCH 01/54] Analyze available archs --- .github/workflows/build.yml | 6 ++---- .github/workflows/test.yml | 12 ++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17fc5dd..21febe9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,8 +48,7 @@ jobs: strategy: fail-fast: false matrix: - architecture: [x64] - # TODO architecture: [x64, x86, arm64] + architecture: [x64, x86, arm, arm64] variant: ['shared', 'static'] steps: - uses: actions/checkout@v3 @@ -65,8 +64,7 @@ jobs: strategy: fail-fast: false matrix: - # TODO architecture: [x64, x86, arm64] - architecture: [x64] + architecture: [x64, x86, arm, arm64] variant: ['shared'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..95498d3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,12 @@ +on: + workflow_dispatch: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - run: ls -l /usr + - run: ls -l /usr/bin + - run: ls -l /usr/lib + - run: ls -l /usr/include \ No newline at end of file From 3add550fc82a37139bbf358dc336db1f3aecbba3 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 14:48:08 +0200 Subject: [PATCH 02/54] Test packages --- .github/workflows/test.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 95498d3..7677be4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,15 @@ jobs: test: runs-on: ubuntu-latest steps: + - run: sudo apt-get update + - run: sudo apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 - run: ls -l /usr - run: ls -l /usr/bin - run: ls -l /usr/lib - - run: ls -l /usr/include \ No newline at end of file + - run: ls -l /usr/include + + - run: sudo apt-get install gcc-multilib g++-multilib + - run: ls -l /usr + - run: ls -l /usr/bin + - run: ls -l /usr/lib + - run: ls -l /usr/include From c53b893047b11c3cdd1c68170a3cc386c94327f4 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 15:02:04 +0200 Subject: [PATCH 03/54] Check paths --- .github/workflows/test.yml | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7677be4..b160c84 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,13 +8,28 @@ jobs: steps: - run: sudo apt-get update - run: sudo apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 - - run: ls -l /usr - - run: ls -l /usr/bin - - run: ls -l /usr/lib - - run: ls -l /usr/include - - run: sudo apt-get install gcc-multilib g++-multilib - - run: ls -l /usr - - run: ls -l /usr/bin - - run: ls -l /usr/lib - - run: ls -l /usr/include + - run: ls -l /usr/aarch64-linux-gnu + - run: ls -l /usr/aarch64-linux-gnu/bin + - run: ls -l /usr/aarch64-linux-gnu/include + - run: ls -l /usr/aarch64-linux-gnu/include/c++/ + - run: ls -l /usr/aarch64-linux-gnu/include/c++/current/ + - run: ls -l /usr/arm-linux-gnueabihf + - run: ls -l /usr/arm-linux-gnueabihf/bin + - run: ls -l /usr/arm-linux-gnueabihf/include + - run: ls -l /usr/arm-linux-gnueabihf/include/c++/ + - run: ls -l /usr/arm-linux-gnueabihf/include/c++/current/ + - run: ls -l /usr/i686-linux-gnu + - run: ls -l /usr/i686-linux-gnu/bin + - run: ls -l /usr/i686-linux-gnu/include + - run: ls -l /usr/i686-linux-gnu/include/c++/ + - run: ls -l /usr/i686-linux-gnu/include/c++/current/ + + + # - run: sudo dpkg --add-architecture armhf + # - run: sudo dpkg --add-architecture arm64 + # - run: sudo dpkg --add-architecture i386 + # - run: ls -l /usr + # - run: ls -l /usr/bin + # - run: ls -l /usr/lib + # - run: ls -l /usr/include From 11a30e11720816992cb6660f1ec392883dd1686e Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 15:23:19 +0200 Subject: [PATCH 04/54] More test outputs --- .github/workflows/test.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b160c84..295bdec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,6 @@ on: workflow_dispatch: + pull_request: jobs: @@ -11,25 +12,34 @@ jobs: - run: sudo apt-get install gcc-multilib g++-multilib - run: ls -l /usr/aarch64-linux-gnu - run: ls -l /usr/aarch64-linux-gnu/bin + - run: ls -l /usr/aarch64-linux-gnu/lib - run: ls -l /usr/aarch64-linux-gnu/include - run: ls -l /usr/aarch64-linux-gnu/include/c++/ - run: ls -l /usr/aarch64-linux-gnu/include/c++/current/ + - run: ls -l /usr/arm-linux-gnueabihf - run: ls -l /usr/arm-linux-gnueabihf/bin + - run: ls -l /usr/arm-linux-gnueabihf/lib - run: ls -l /usr/arm-linux-gnueabihf/include - run: ls -l /usr/arm-linux-gnueabihf/include/c++/ - run: ls -l /usr/arm-linux-gnueabihf/include/c++/current/ + - run: ls -l /usr/i686-linux-gnu - run: ls -l /usr/i686-linux-gnu/bin + - run: ls -l /usr/i686-linux-gnu/lib - run: ls -l /usr/i686-linux-gnu/include - run: ls -l /usr/i686-linux-gnu/include/c++/ - run: ls -l /usr/i686-linux-gnu/include/c++/current/ - # - run: sudo dpkg --add-architecture armhf - # - run: sudo dpkg --add-architecture arm64 - # - run: sudo dpkg --add-architecture i386 + - run: sudo dpkg --add-architecture armhf + - run: sudo apt-get install libfontconfig-dev:armhf + + - run: sudo dpkg --add-architecture arm64 + - run: sudo apt-get install libfontconfig-dev:arm64 + + - run: sudo dpkg --add-architecture i386 + - run: sudo apt-get install libfontconfig-dev:i386 + # - run: ls -l /usr - # - run: ls -l /usr/bin - # - run: ls -l /usr/lib # - run: ls -l /usr/include From f7500f99fa3d25214688d8e22608f2fc4d7558c5 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 15:26:38 +0200 Subject: [PATCH 05/54] Continue on error --- .github/workflows/test.yml | 46 +++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 295bdec..bcd2e8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,26 +10,32 @@ jobs: - run: sudo apt-get update - run: sudo apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 - run: sudo apt-get install gcc-multilib g++-multilib - - run: ls -l /usr/aarch64-linux-gnu - - run: ls -l /usr/aarch64-linux-gnu/bin - - run: ls -l /usr/aarch64-linux-gnu/lib - - run: ls -l /usr/aarch64-linux-gnu/include - - run: ls -l /usr/aarch64-linux-gnu/include/c++/ - - run: ls -l /usr/aarch64-linux-gnu/include/c++/current/ - - - run: ls -l /usr/arm-linux-gnueabihf - - run: ls -l /usr/arm-linux-gnueabihf/bin - - run: ls -l /usr/arm-linux-gnueabihf/lib - - run: ls -l /usr/arm-linux-gnueabihf/include - - run: ls -l /usr/arm-linux-gnueabihf/include/c++/ - - run: ls -l /usr/arm-linux-gnueabihf/include/c++/current/ - - - run: ls -l /usr/i686-linux-gnu - - run: ls -l /usr/i686-linux-gnu/bin - - run: ls -l /usr/i686-linux-gnu/lib - - run: ls -l /usr/i686-linux-gnu/include - - run: ls -l /usr/i686-linux-gnu/include/c++/ - - run: ls -l /usr/i686-linux-gnu/include/c++/current/ + - run: | + ls -l /usr/aarch64-linux-gnu + ls -l /usr/aarch64-linux-gnu/bin + ls -l /usr/aarch64-linux-gnu/lib + ls -l /usr/aarch64-linux-gnu/include + ls -l /usr/aarch64-linux-gnu/include/c++/ + ls -l /usr/aarch64-linux-gnu/include/c++/11/ + echo OK + + - run: | + ls -l /usr/arm-linux-gnueabihf + ls -l /usr/arm-linux-gnueabihf/bin + ls -l /usr/arm-linux-gnueabihf/lib + ls -l /usr/arm-linux-gnueabihf/include + ls -l /usr/arm-linux-gnueabihf/include/c++/ + ls -l /usr/arm-linux-gnueabihf/include/c++/11/ + echo OK + + - run: | + ls -l /usr/i686-linux-gnu + ls -l /usr/i686-linux-gnu/bin + ls -l /usr/i686-linux-gnu/lib + ls -l /usr/i686-linux-gnu/include + ls -l /usr/i686-linux-gnu/include/c++/ + ls -l /usr/i686-linux-gnu/include/c++/11/ + echo OK - run: sudo dpkg --add-architecture armhf From 949ebb580a9b9cff503859001cf51af3fd9e1fd3 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 15:47:10 +0200 Subject: [PATCH 06/54] check apt sources --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bcd2e8b..aa6c209 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,7 @@ jobs: test: runs-on: ubuntu-latest steps: + - run: sudo cat /etc/apt/sources.list - run: sudo apt-get update - run: sudo apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 - run: sudo apt-get install gcc-multilib g++-multilib From a08097861f7df0120b71f6d84de35b057d5a3927 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 15:49:10 +0200 Subject: [PATCH 07/54] Update before install --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aa6c209..a35a156 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,12 +40,15 @@ jobs: - run: sudo dpkg --add-architecture armhf + - run: sudo apt-get update - run: sudo apt-get install libfontconfig-dev:armhf - run: sudo dpkg --add-architecture arm64 + - run: sudo apt-get update - run: sudo apt-get install libfontconfig-dev:arm64 - run: sudo dpkg --add-architecture i386 + - run: sudo apt-get update - run: sudo apt-get install libfontconfig-dev:i386 # - run: ls -l /usr From f0a770ce4426e08ffa2df6b0410fc21ea5ece5fd Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 15:52:47 +0200 Subject: [PATCH 08/54] print apt mirrors --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a35a156..462aaf4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,6 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - run: sudo cat /etc/apt/sources.list + - run: sudo cat /etc/apt/apt-mirrors.txt - run: sudo apt-get update - run: sudo apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 - run: sudo apt-get install gcc-multilib g++-multilib From c3b0e22b4b1a1c07b4076c8ea1dc37b221ff3f4a Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 15:59:17 +0200 Subject: [PATCH 09/54] Arch test --- .github/workflows/test.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 462aaf4..fc167eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,8 +7,6 @@ jobs: test: runs-on: ubuntu-latest steps: - - run: sudo cat /etc/apt/sources.list - - run: sudo cat /etc/apt/apt-mirrors.txt - run: sudo apt-get update - run: sudo apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 - run: sudo apt-get install gcc-multilib g++-multilib @@ -39,18 +37,12 @@ jobs: ls -l /usr/i686-linux-gnu/include/c++/11/ echo OK - - run: sudo dpkg --add-architecture armhf - - run: sudo apt-get update - - run: sudo apt-get install libfontconfig-dev:armhf - - run: sudo dpkg --add-architecture arm64 - - run: sudo apt-get update - - run: sudo apt-get install libfontconfig-dev:arm64 - - run: sudo dpkg --add-architecture i386 + - run: sudo cat /'deb [arch=i386,arm64,armhf] mirror+file:/etc/apt/apt-mirrors.txt jammy main universe' >> /etc/apt/sources.list - run: sudo apt-get update - - run: sudo apt-get install libfontconfig-dev:i386 - - # - run: ls -l /usr - # - run: ls -l /usr/include + + - run: sudo apt-get install libfontconfig-dev:armhf + - run: sudo apt-get install libfontconfig-dev:arm64 + - run: sudo apt-get install libfontconfig-dev:i386 \ No newline at end of file From 541975407e74de2491a826e02e75d4cbf0e6be47 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 16:09:01 +0200 Subject: [PATCH 10/54] Check install with container --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc167eb..78f6698 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,8 @@ on: jobs: test: runs-on: ubuntu-latest + container: + image: debian:bookworm steps: - run: sudo apt-get update - run: sudo apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 @@ -40,7 +42,7 @@ jobs: - run: sudo dpkg --add-architecture armhf - run: sudo dpkg --add-architecture arm64 - run: sudo dpkg --add-architecture i386 - - run: sudo cat /'deb [arch=i386,arm64,armhf] mirror+file:/etc/apt/apt-mirrors.txt jammy main universe' >> /etc/apt/sources.list + # - run: sudo cat /'deb [arch=i386,arm64,armhf] mirror+file:/etc/apt/apt-mirrors.txt jammy main universe' >> /etc/apt/sources.list - run: sudo apt-get update - run: sudo apt-get install libfontconfig-dev:armhf From 1d4aedc1ba1c39a0828832fb832ccb208a107edf Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 16:11:35 +0200 Subject: [PATCH 11/54] Remove sudo for container --- .github/workflows/test.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78f6698..bc139d0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,9 +9,9 @@ jobs: container: image: debian:bookworm steps: - - run: sudo apt-get update - - run: sudo apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 - - run: sudo apt-get install gcc-multilib g++-multilib + - run: apt-get update + - run: apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 + - run: apt-get install gcc-multilib g++-multilib - run: | ls -l /usr/aarch64-linux-gnu ls -l /usr/aarch64-linux-gnu/bin @@ -39,12 +39,12 @@ jobs: ls -l /usr/i686-linux-gnu/include/c++/11/ echo OK - - run: sudo dpkg --add-architecture armhf - - run: sudo dpkg --add-architecture arm64 - - run: sudo dpkg --add-architecture i386 - # - run: sudo cat /'deb [arch=i386,arm64,armhf] mirror+file:/etc/apt/apt-mirrors.txt jammy main universe' >> /etc/apt/sources.list - - run: sudo apt-get update + - run: dpkg --add-architecture armhf + - run: dpkg --add-architecture arm64 + - run: dpkg --add-architecture i386 + # - run: cat /'deb [arch=i386,arm64,armhf] mirror+file:/etc/apt/apt-mirrors.txt jammy main universe' >> /etc/apt/sources.list + - run: apt-get update - - run: sudo apt-get install libfontconfig-dev:armhf - - run: sudo apt-get install libfontconfig-dev:arm64 - - run: sudo apt-get install libfontconfig-dev:i386 \ No newline at end of file + - run: apt-get install libfontconfig-dev:armhf + - run: apt-get install libfontconfig-dev:arm64 + - run: apt-get install libfontconfig-dev:i386 \ No newline at end of file From 3738658f4e7d88f7c3b8dee9dc39a372b3b79a9c Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 16:12:49 +0200 Subject: [PATCH 12/54] Add confirm flag --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc139d0..94c045f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,8 +10,8 @@ jobs: image: debian:bookworm steps: - run: apt-get update - - run: apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 - - run: apt-get install gcc-multilib g++-multilib + - run: apt-get install -y crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 + - run: apt-get install -y gcc-multilib g++-multilib - run: | ls -l /usr/aarch64-linux-gnu ls -l /usr/aarch64-linux-gnu/bin @@ -45,6 +45,6 @@ jobs: # - run: cat /'deb [arch=i386,arm64,armhf] mirror+file:/etc/apt/apt-mirrors.txt jammy main universe' >> /etc/apt/sources.list - run: apt-get update - - run: apt-get install libfontconfig-dev:armhf - - run: apt-get install libfontconfig-dev:arm64 - - run: apt-get install libfontconfig-dev:i386 \ No newline at end of file + - run: apt-get install -y libfontconfig-dev:armhf + - run: apt-get install -y libfontconfig-dev:arm64 + - run: apt-get install -y libfontconfig-dev:i386 \ No newline at end of file From 354d95c39b2749d5e6eb112df666e7e781981ec4 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 16:14:57 +0200 Subject: [PATCH 13/54] Use c++/12 --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 94c045f..a2d72c5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: test: runs-on: ubuntu-latest container: - image: debian:bookworm + image: ubuntu:latest steps: - run: apt-get update - run: apt-get install -y crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 @@ -18,7 +18,7 @@ jobs: ls -l /usr/aarch64-linux-gnu/lib ls -l /usr/aarch64-linux-gnu/include ls -l /usr/aarch64-linux-gnu/include/c++/ - ls -l /usr/aarch64-linux-gnu/include/c++/11/ + ls -l /usr/aarch64-linux-gnu/include/c++/12/ echo OK - run: | @@ -27,7 +27,7 @@ jobs: ls -l /usr/arm-linux-gnueabihf/lib ls -l /usr/arm-linux-gnueabihf/include ls -l /usr/arm-linux-gnueabihf/include/c++/ - ls -l /usr/arm-linux-gnueabihf/include/c++/11/ + ls -l /usr/arm-linux-gnueabihf/include/c++/12/ echo OK - run: | @@ -36,7 +36,7 @@ jobs: ls -l /usr/i686-linux-gnu/lib ls -l /usr/i686-linux-gnu/include ls -l /usr/i686-linux-gnu/include/c++/ - ls -l /usr/i686-linux-gnu/include/c++/11/ + ls -l /usr/i686-linux-gnu/include/c++/13/ echo OK - run: dpkg --add-architecture armhf From 4ad9d3a3ee01df0a2942400ef296ac3f55f472b1 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 16:16:57 +0200 Subject: [PATCH 14/54] Back to c++/11 for ubuntu --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2d72c5..42024d8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: ls -l /usr/aarch64-linux-gnu/lib ls -l /usr/aarch64-linux-gnu/include ls -l /usr/aarch64-linux-gnu/include/c++/ - ls -l /usr/aarch64-linux-gnu/include/c++/12/ + ls -l /usr/aarch64-linux-gnu/include/c++/11/ echo OK - run: | @@ -27,7 +27,7 @@ jobs: ls -l /usr/arm-linux-gnueabihf/lib ls -l /usr/arm-linux-gnueabihf/include ls -l /usr/arm-linux-gnueabihf/include/c++/ - ls -l /usr/arm-linux-gnueabihf/include/c++/12/ + ls -l /usr/arm-linux-gnueabihf/include/c++/11/ echo OK - run: | @@ -36,7 +36,7 @@ jobs: ls -l /usr/i686-linux-gnu/lib ls -l /usr/i686-linux-gnu/include ls -l /usr/i686-linux-gnu/include/c++/ - ls -l /usr/i686-linux-gnu/include/c++/13/ + ls -l /usr/i686-linux-gnu/include/c++/11/ echo OK - run: dpkg --add-architecture armhf From 37f44354b526bc6851b64f737a5b9837ea4004d7 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 20:21:34 +0200 Subject: [PATCH 15/54] test sources modification --- .github/workflows/test.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 42024d8..ff16877 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,12 +6,10 @@ on: jobs: test: runs-on: ubuntu-latest - container: - image: ubuntu:latest steps: - - run: apt-get update - - run: apt-get install -y crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 - - run: apt-get install -y gcc-multilib g++-multilib + - run: sudo apt-get update + - run: sudo apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 + - run: sudo apt-get install gcc-multilib g++-multilib - run: | ls -l /usr/aarch64-linux-gnu ls -l /usr/aarch64-linux-gnu/bin @@ -39,12 +37,17 @@ jobs: ls -l /usr/i686-linux-gnu/include/c++/11/ echo OK - - run: dpkg --add-architecture armhf - - run: dpkg --add-architecture arm64 - - run: dpkg --add-architecture i386 - # - run: cat /'deb [arch=i386,arm64,armhf] mirror+file:/etc/apt/apt-mirrors.txt jammy main universe' >> /etc/apt/sources.list - - run: apt-get update + - run: sudo dpkg --add-architecture armhf + - run: sudo dpkg --add-architecture arm64 + - run: sudo dpkg --add-architecture i386 + # Limit current sources to amd64 + - run: sudo sed -i "s/deb/deb [arch=amd64]/" /etc/apt/sources.list + - run: sudo cat /etc/apt/sources.list + # Add other archs from ports.ubuntu.com + - run: sudo echo 'deb [arch=i386,arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list + - run: sudo echo 'deb-src [arch=i386,arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list + - run: sudo apt-get update - - run: apt-get install -y libfontconfig-dev:armhf - - run: apt-get install -y libfontconfig-dev:arm64 - - run: apt-get install -y libfontconfig-dev:i386 \ No newline at end of file + - run: sudo apt-get install libfontconfig-dev:armhf + - run: sudo apt-get install libfontconfig-dev:arm64 + - run: sudo apt-get install libfontconfig-dev:i386 From a1d5f7fd1820418fa73d2682d1827d9909cf97b7 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 20:25:57 +0200 Subject: [PATCH 16/54] Fix sources update --- .github/workflows/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ff16877..ca2a331 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,11 +41,12 @@ jobs: - run: sudo dpkg --add-architecture arm64 - run: sudo dpkg --add-architecture i386 # Limit current sources to amd64 - - run: sudo sed -i "s/deb/deb [arch=amd64]/" /etc/apt/sources.list + - run: sudo sed -i "s/deb /deb [arch=amd64] /" /etc/apt/sources.list + - run: sudo sed -i "s/deb-src /deb-src [arch=amd64] /" /etc/apt/sources.list - run: sudo cat /etc/apt/sources.list # Add other archs from ports.ubuntu.com - - run: sudo echo 'deb [arch=i386,arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list - - run: sudo echo 'deb-src [arch=i386,arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list + - run: sudo su -c "echo 'deb [arch=i386,arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" + - run: sudo su -c "echo 'deb-src [arch=i386,arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - run: sudo apt-get update - run: sudo apt-get install libfontconfig-dev:armhf From 98adcbfb763c354e9004a1784118c2f2b506d141 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 20:31:31 +0200 Subject: [PATCH 17/54] Source update --- .github/workflows/test.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca2a331..c5e9af0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,12 +41,11 @@ jobs: - run: sudo dpkg --add-architecture arm64 - run: sudo dpkg --add-architecture i386 # Limit current sources to amd64 - - run: sudo sed -i "s/deb /deb [arch=amd64] /" /etc/apt/sources.list - - run: sudo sed -i "s/deb-src /deb-src [arch=amd64] /" /etc/apt/sources.list - - run: sudo cat /etc/apt/sources.list + - run: sudo sed -i "s/deb /deb [arch=amd64,i386] /" /etc/apt/sources.list + - run: sudo sed -i "s/deb-src /deb-src [arch=amd64,i386] /" /etc/apt/sources.list # Add other archs from ports.ubuntu.com - - run: sudo su -c "echo 'deb [arch=i386,arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - - run: sudo su -c "echo 'deb-src [arch=i386,arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" + - run: sudo su -c "echo 'deb [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" + - run: sudo su -c "echo 'deb-src [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - run: sudo apt-get update - run: sudo apt-get install libfontconfig-dev:armhf From 8f191c72a1bb44f4de085b0343746f39e7905355 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 20:38:05 +0200 Subject: [PATCH 18/54] libc6 --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c5e9af0..f6c9a8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,6 +48,6 @@ jobs: - run: sudo su -c "echo 'deb-src [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - run: sudo apt-get update - - run: sudo apt-get install libfontconfig-dev:armhf - - run: sudo apt-get install libfontconfig-dev:arm64 - - run: sudo apt-get install libfontconfig-dev:i386 + - run: sudo apt-get install libc6-armhf-cross libfontconfig-dev:armhf + - run: sudo apt-get install libc6-arm64-cross libfontconfig-dev:arm64 + - run: sudo apt-get install libc6-i386-cross libfontconfig-dev:i386 From 8feb06b8d33b27a31269ccd289129a8c1facf73e Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 20:42:05 +0200 Subject: [PATCH 19/54] libc6-dev --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6c9a8b..df06b5d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,6 +48,6 @@ jobs: - run: sudo su -c "echo 'deb-src [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - run: sudo apt-get update - - run: sudo apt-get install libc6-armhf-cross libfontconfig-dev:armhf - - run: sudo apt-get install libc6-arm64-cross libfontconfig-dev:arm64 - - run: sudo apt-get install libc6-i386-cross libfontconfig-dev:i386 + - run: sudo apt-get install libc6-dev-armhf-cross libc6-dev:armhf libfontconfig-dev:armhf + - run: sudo apt-get install libc6-dev-arm64-cross libc6-dev:arm64 libfontconfig-dev:arm64 + - run: sudo apt-get install libc6-dev-i386-cross libc6-dev:i386 libfontconfig-dev:i386 From e763c21a976302d15041646c588deed58e7d51b1 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 20:52:11 +0200 Subject: [PATCH 20/54] reorder --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df06b5d..a5818d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,7 +47,7 @@ jobs: - run: sudo su -c "echo 'deb [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - run: sudo su -c "echo 'deb-src [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - run: sudo apt-get update - - - run: sudo apt-get install libc6-dev-armhf-cross libc6-dev:armhf libfontconfig-dev:armhf - - run: sudo apt-get install libc6-dev-arm64-cross libc6-dev:arm64 libfontconfig-dev:arm64 - - run: sudo apt-get install libc6-dev-i386-cross libc6-dev:i386 libfontconfig-dev:i386 + + - run: sudo apt-get install libc6-dev:i386 libfontconfig-dev:i386 + - run: sudo apt-get install libc6-dev:arm64 libfontconfig-dev:arm64 + - run: sudo apt-get install libc6-dev:armhf libfontconfig-dev:armhf From c96a693dab5e9476df53984a5db34e839950e142 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 20:59:30 +0200 Subject: [PATCH 21/54] individual install --- .github/workflows/test.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a5818d2..10a842c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,6 +48,10 @@ jobs: - run: sudo su -c "echo 'deb-src [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - run: sudo apt-get update - - run: sudo apt-get install libc6-dev:i386 libfontconfig-dev:i386 - - run: sudo apt-get install libc6-dev:arm64 libfontconfig-dev:arm64 - - run: sudo apt-get install libc6-dev:armhf libfontconfig-dev:armhf + # - run: sudo apt-get install libc6-dev:i386 libfontconfig-dev:i386 + # - run: sudo apt-get install libc6-dev:arm64 libfontconfig-dev:arm64 + # - run: sudo apt-get install libc6-dev:armhf libfontconfig-dev:armhf + + - run: sudo apt-get -y install libc6:i386 + - run: sudo apt-get -y install libc6-dev:i386 + - run: sudo apt-get -y install libfontconfig-dev:i386 From 75afb23d018dfa6a3158270d8adb53236775216c Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 21:02:33 +0200 Subject: [PATCH 22/54] More archs --- .github/workflows/test.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 10a842c..189302c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,10 +48,21 @@ jobs: - run: sudo su -c "echo 'deb-src [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - run: sudo apt-get update - # - run: sudo apt-get install libc6-dev:i386 libfontconfig-dev:i386 - # - run: sudo apt-get install libc6-dev:arm64 libfontconfig-dev:arm64 - # - run: sudo apt-get install libc6-dev:armhf libfontconfig-dev:armhf + - run: sudo apt-get -y install libc6-dev:i386 libc6-dev:arm64 libc6-dev:armhf + - run: sudo apt-get -y install libfontconfig-dev:i386 libfontconfig-dev:arm64 libfontconfig-dev:armhf - - run: sudo apt-get -y install libc6:i386 - - run: sudo apt-get -y install libc6-dev:i386 - - run: sudo apt-get -y install libfontconfig-dev:i386 + + - run: | + ls -l /usr/aarch64-linux-gnu/include + ls -l /usr/aarch64-linux-gnu/include/c++/11/ + echo OK + + - run: | + ls -l /usr/arm-linux-gnueabihf/include + ls -l /usr/arm-linux-gnueabihf/include/c++/11/ + echo OK + + - run: | + ls -l /usr/i686-linux-gnu/include + ls -l /usr/i686-linux-gnu/include/c++/11/ + echo OK \ No newline at end of file From 2b9af8725b9b32ea4b43d5a2c8a21f6d0fc8e907 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 21:03:11 +0200 Subject: [PATCH 23/54] Indention fix --- .github/workflows/test.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 189302c..9ae48c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,12 +57,12 @@ jobs: ls -l /usr/aarch64-linux-gnu/include/c++/11/ echo OK - - run: | - ls -l /usr/arm-linux-gnueabihf/include - ls -l /usr/arm-linux-gnueabihf/include/c++/11/ - echo OK + - run: | + ls -l /usr/arm-linux-gnueabihf/include + ls -l /usr/arm-linux-gnueabihf/include/c++/11/ + echo OK - - run: | - ls -l /usr/i686-linux-gnu/include - ls -l /usr/i686-linux-gnu/include/c++/11/ - echo OK \ No newline at end of file + - run: | + ls -l /usr/i686-linux-gnu/include + ls -l /usr/i686-linux-gnu/include/c++/11/ + echo OK \ No newline at end of file From fc2e2bd2340846f9628a5cc0259f374e76baf1ac Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 21:04:22 +0200 Subject: [PATCH 24/54] Indention 2 --- .github/workflows/test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ae48c0..f9b60e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,17 +52,17 @@ jobs: - run: sudo apt-get -y install libfontconfig-dev:i386 libfontconfig-dev:arm64 libfontconfig-dev:armhf - - run: | + - run: | ls -l /usr/aarch64-linux-gnu/include ls -l /usr/aarch64-linux-gnu/include/c++/11/ echo OK - - run: | - ls -l /usr/arm-linux-gnueabihf/include - ls -l /usr/arm-linux-gnueabihf/include/c++/11/ - echo OK + - run: | + ls -l /usr/arm-linux-gnueabihf/include + ls -l /usr/arm-linux-gnueabihf/include/c++/11/ + echo OK - - run: | - ls -l /usr/i686-linux-gnu/include - ls -l /usr/i686-linux-gnu/include/c++/11/ - echo OK \ No newline at end of file + - run: | + ls -l /usr/i686-linux-gnu/include + ls -l /usr/i686-linux-gnu/include/c++/11/ + echo OK \ No newline at end of file From 7a140b0f50e5aa5079397d277052816da188f143 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 21:05:18 +0200 Subject: [PATCH 25/54] Indention 3 --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9b60e2..8ac48d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,18 +51,18 @@ jobs: - run: sudo apt-get -y install libc6-dev:i386 libc6-dev:arm64 libc6-dev:armhf - run: sudo apt-get -y install libfontconfig-dev:i386 libfontconfig-dev:arm64 libfontconfig-dev:armhf - - run: | ls -l /usr/aarch64-linux-gnu/include ls -l /usr/aarch64-linux-gnu/include/c++/11/ echo OK - run: | - ls -l /usr/arm-linux-gnueabihf/include + ls -l /usr/arm-linux-gnueabihf/include ls -l /usr/arm-linux-gnueabihf/include/c++/11/ echo OK - run: | ls -l /usr/i686-linux-gnu/include ls -l /usr/i686-linux-gnu/include/c++/11/ - echo OK \ No newline at end of file + echo OK + From 79a3444c00ded941d6278930f086e1f6e245fa8e Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 21:07:38 +0200 Subject: [PATCH 26/54] Check individual install --- .github/workflows/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ac48d2..181c803 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,8 +48,12 @@ jobs: - run: sudo su -c "echo 'deb-src [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - run: sudo apt-get update - - run: sudo apt-get -y install libc6-dev:i386 libc6-dev:arm64 libc6-dev:armhf - - run: sudo apt-get -y install libfontconfig-dev:i386 libfontconfig-dev:arm64 libfontconfig-dev:armhf + - run: sudo apt-get -y install libc6-dev:i386 + - run: sudo apt-get -y install libc6-dev:arm64 + - run: sudo apt-get -y install libc6-dev:armhf + - run: sudo apt-get -y install libfontconfig-dev:i386 + - run: sudo apt-get -y install libfontconfig-dev:arm64 + - run: sudo apt-get -y install libfontconfig-dev:armhf - run: | ls -l /usr/aarch64-linux-gnu/include From 0127e1aee0a10acf7d2cc27ef632a3bffb0ebdef Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 21:14:14 +0200 Subject: [PATCH 27/54] try install with aptitude --- .github/workflows/test.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 181c803..9c4f40e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,12 +48,14 @@ jobs: - run: sudo su -c "echo 'deb-src [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - run: sudo apt-get update - - run: sudo apt-get -y install libc6-dev:i386 - - run: sudo apt-get -y install libc6-dev:arm64 - - run: sudo apt-get -y install libc6-dev:armhf - - run: sudo apt-get -y install libfontconfig-dev:i386 - - run: sudo apt-get -y install libfontconfig-dev:arm64 - - run: sudo apt-get -y install libfontconfig-dev:armhf + - run: sudo apt-get -y install aptitude + + - run: sudo aptitude install libc6-dev:i386 + - run: sudo aptitude install libc6-dev:arm64 + - run: sudo aptitude install libc6-dev:armhf + - run: sudo aptitude install libfontconfig-dev:i386 + - run: sudo aptitude install libfontconfig-dev:arm64 + - run: sudo aptitude install libfontconfig-dev:armhf - run: | ls -l /usr/aarch64-linux-gnu/include From 88cf5f58585c8ba2f47e394507452104099bef71 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 21:16:58 +0200 Subject: [PATCH 28/54] Remove multilib --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c4f40e..c07ecba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: steps: - run: sudo apt-get update - run: sudo apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 - - run: sudo apt-get install gcc-multilib g++-multilib + # - run: sudo apt-get install gcc-multilib g++-multilib - run: | ls -l /usr/aarch64-linux-gnu ls -l /usr/aarch64-linux-gnu/bin From 9b96bfc4bfe7bbcc30a127f84a1a3bef85dac573 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sat, 7 Oct 2023 21:20:35 +0200 Subject: [PATCH 29/54] Try confirm --- .github/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c07ecba..6d49adb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,12 +50,12 @@ jobs: - run: sudo apt-get -y install aptitude - - run: sudo aptitude install libc6-dev:i386 - - run: sudo aptitude install libc6-dev:arm64 - - run: sudo aptitude install libc6-dev:armhf - - run: sudo aptitude install libfontconfig-dev:i386 - - run: sudo aptitude install libfontconfig-dev:arm64 - - run: sudo aptitude install libfontconfig-dev:armhf + - run: sudo aptitude install -y libc6-dev:i386 + - run: sudo aptitude install -y libc6-dev:arm64 + - run: sudo aptitude install -y libc6-dev:armhf + - run: sudo aptitude install -y libfontconfig-dev:i386 + - run: sudo aptitude install -y libfontconfig-dev:arm64 + - run: sudo aptitude install -y libfontconfig-dev:armhf - run: | ls -l /usr/aarch64-linux-gnu/include From 79e756cb0acd26fd5da1471be507fbd9e998fe64 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sun, 8 Oct 2023 16:26:26 +0200 Subject: [PATCH 30/54] Prepare linux build --- build/Build.Linux.cs | 73 +++++++++++++++++++++++++++++++++++++------ build/Build.Native.cs | 21 +++++++------ 2 files changed, 75 insertions(+), 19 deletions(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index cec6dce..c8f9a7a 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -1,7 +1,40 @@ using System.Collections.Generic; +using Nuke.Common.Tooling; partial class Build { + void InstallDependenciesLinux() + { + if (!IsGitHubActions) + { + return; + } + + var bash = ToolResolver.GetPathTool("bash"); + var sudo = ToolResolver.GetPathTool("sudo"); + var dependenciesScript = SkiaPath / "tools" / "install_dependencies.sh"; + bash($"{dependenciesScript}", workingDirectory: SkiaPath); + + var arch = Architecture.LinuxArch; + sudo($"apt-get update"); + sudo("apt-get upgrade -y"); + + sudo($"dpkg -add-architecture {arch}"); + + if (arch == Architecture.Arm || arch == Architecture.Arm64) + { + sudo("sed -i \"s/deb /deb [arch=amd64,i386] /\" /etc/apt/sources.list"); + sudo("sed -i \"s/deb-src /deb-src [arch=amd64,i386] /\" /etc/apt/sources.list"); + sudo($"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list\""); + sudo($"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list\""); + sudo($"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list\""); + sudo($"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list\""); + } + + sudo($"apt-get update"); + sudo($"aptitude install -y crossbuild-essential-{arch} libstdc++-11-dev-{arch}-cross"); + sudo($"aptitude install -y libfontconfig-dev:{arch} libgl1-mesa-dev:{arch} libglu1-mesa-dev:{arch}"); + } void BuildLibAlphaSkiaLinux() { var gnArgs = new Dictionary(); @@ -54,27 +87,49 @@ void SetClangLinux(Dictionary gnArgs) { AppendToFlagList(gnArgs, "extra_cflags", "'-DHAVE_SYSCALL_GETRANDOM', '-DXML_DEV_URANDOM'"); + gnArgs["cc"] = "clang"; + gnArgs["cxx"] = "'clang++'"; + + string crossCompileToolchainArch = null; + string crossCompileTargetArch = null; if (Architecture == Architecture.X64) { - gnArgs["cc"] = "clang"; - gnArgs["cxx"] = "'clang++'"; AppendToFlagList(gnArgs, "extra_ldflags", "'-static-libstdc++', '-static-libgcc'"); } else if (Architecture == Architecture.X86) { // TODO - gnArgs["cc"] = "clang"; - gnArgs["cxx"] = "'clang++'"; + crossCompileToolchainArch = "i686-linux-gnu"; + crossCompileTargetArch = "i686-linux-gnu"; AppendToFlagList(gnArgs, "extra_ldflags", "'-static-libstdc++', '-static-libgcc'"); } - else if (Architecture == Architecture.Arm64) // aka AArch64 + else if (Architecture == Architecture.Arm64) { - // TODO - gnArgs["cc"] = "clang"; - gnArgs["cxx"] = "'clang++'"; + crossCompileToolchainArch = "aarch64-linux-gnu"; + crossCompileTargetArch = "aarch64-linux-gnu"; + AppendToFlagList(gnArgs, "extra_ldflags", "'-static-libstdc++', '-static-libgcc'"); + } + else if (Architecture == Architecture.Arm) + { + crossCompileToolchainArch = "arm-linux-gnueabihf"; + crossCompileTargetArch = "armv7a-linux-gnueabihf"; AppendToFlagList(gnArgs, "extra_ldflags", "'-static-libstdc++', '-static-libgcc'"); } - // gnArgs["ar"] = "llvm-ar"; + if (!string.IsNullOrEmpty(crossCompileToolchainArch)) + { + var sysroot = $"/usr/{crossCompileToolchainArch}"; + var init = $"'--sysroot={sysroot}', '--target={crossCompileTargetArch}'"; + var bin = $"'-B{sysroot}/bin/' "; + var libs = $"'-L{sysroot}/lib/' "; + var includes = + $"'-I{sysroot}/include', " + + $"'-I{sysroot}/include/c++/current', " + + $"'-I{sysroot}/include/c++/current/{crossCompileToolchainArch}' "; + + AppendToFlagList(gnArgs, "extra_asmflags", $"{init}, '-no-integrated-as', {bin}, {includes}"); + AppendToFlagList(gnArgs, "extra_ldflags", $"{init}, {bin}, {libs}"); + AppendToFlagList(gnArgs, "extra_cflags", $"{init}, {bin}, {includes}"); + } } } \ No newline at end of file diff --git a/build/Build.Native.cs b/build/Build.Native.cs index ff5a140..2742556 100644 --- a/build/Build.Native.cs +++ b/build/Build.Native.cs @@ -15,16 +15,16 @@ public class TargetOperatingSystem : Enumeration { public static TargetOperatingSystem Windows = new() - { Value = "windows", SkiaTargetOs = "win", RuntimeIdentifier = "win" }; + { Value = "windows", SkiaTargetOs = "win", RuntimeIdentifier = "win" }; public static TargetOperatingSystem Linux = new() - { Value = "linux", SkiaTargetOs = "linux", RuntimeIdentifier = "linux" }; + { Value = "linux", SkiaTargetOs = "linux", RuntimeIdentifier = "linux" }; public static TargetOperatingSystem Android = new() - { Value = "android", SkiaTargetOs = "android", RuntimeIdentifier = "android" }; + { Value = "android", SkiaTargetOs = "android", RuntimeIdentifier = "android" }; public static TargetOperatingSystem MacOs = new() - { Value = "macos", SkiaTargetOs = "mac", RuntimeIdentifier = "macos" }; + { Value = "macos", SkiaTargetOs = "mac", RuntimeIdentifier = "macos" }; public string SkiaTargetOs { get; private set; } public string RuntimeIdentifier { get; private set; } @@ -33,10 +33,12 @@ public class TargetOperatingSystem : Enumeration [TypeConverter(typeof(TypeConverter))] public class Architecture : Enumeration { - public static Architecture X64 = new() { Value = "x64" }; - public static Architecture X86 = new() { Value = "x86" }; - public static Architecture Arm = new() { Value = "arm" }; - public static Architecture Arm64 = new() { Value = "arm64" }; + public static Architecture X64 = new() { Value = "x64", LinuxArch = "amd64" }; + public static Architecture X86 = new() { Value = "x86", LinuxArch = "i386" }; + public static Architecture Arm = new() { Value = "arm", LinuxArch = "armhf" }; + public static Architecture Arm64 = new() { Value = "arm64", LinuxArch = "arm64" }; + + public string LinuxArch { get; private set; } } [TypeConverter(typeof(TypeConverter))] @@ -143,8 +145,7 @@ partial class Build GitTool("submodule update --init --recursive"); if (OperatingSystem.IsLinux()) { - var dependenciesScript = SkiaPath / "tools" / "install_dependencies.sh"; - ToolResolver.GetPathTool("bash")($"{dependenciesScript}", workingDirectory: SkiaPath); + InstallDependenciesLinux(); } } }) From 025fec8a9d564859a9a59126b0669fdf2fd694cf Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sun, 8 Oct 2023 16:53:14 +0200 Subject: [PATCH 31/54] Manual resolve of latest c++ include dir and fallback --- build/Build.Linux.cs | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index c8f9a7a..2f88642 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -1,4 +1,7 @@ using System.Collections.Generic; +using System.IO; +using System.Linq; +using Nuke.Common.IO; using Nuke.Common.Tooling; partial class Build @@ -9,7 +12,7 @@ void InstallDependenciesLinux() { return; } - + var bash = ToolResolver.GetPathTool("bash"); var sudo = ToolResolver.GetPathTool("sudo"); var dependenciesScript = SkiaPath / "tools" / "install_dependencies.sh"; @@ -18,23 +21,28 @@ void InstallDependenciesLinux() var arch = Architecture.LinuxArch; sudo($"apt-get update"); sudo("apt-get upgrade -y"); - + sudo($"dpkg -add-architecture {arch}"); if (arch == Architecture.Arm || arch == Architecture.Arm64) { sudo("sed -i \"s/deb /deb [arch=amd64,i386] /\" /etc/apt/sources.list"); sudo("sed -i \"s/deb-src /deb-src [arch=amd64,i386] /\" /etc/apt/sources.list"); - sudo($"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list\""); - sudo($"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list\""); - sudo($"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list\""); - sudo($"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list\""); + sudo( + $"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list\""); + sudo( + $"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list\""); + sudo( + $"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list\""); + sudo( + $"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list\""); } sudo($"apt-get update"); sudo($"aptitude install -y crossbuild-essential-{arch} libstdc++-11-dev-{arch}-cross"); sudo($"aptitude install -y libfontconfig-dev:{arch} libgl1-mesa-dev:{arch} libglu1-mesa-dev:{arch}"); } + void BuildLibAlphaSkiaLinux() { var gnArgs = new Dictionary(); @@ -122,10 +130,19 @@ void SetClangLinux(Dictionary gnArgs) var init = $"'--sysroot={sysroot}', '--target={crossCompileTargetArch}'"; var bin = $"'-B{sysroot}/bin/' "; var libs = $"'-L{sysroot}/lib/' "; - var includes = + + AbsolutePath sysRootPath = sysroot; + var newestCpp = Directory.EnumerateDirectories(sysRootPath / "include" / "c++") + .Select(Path.GetFileName) + .OrderByDescending(x => x) + .First(); + + + var includes = $"'-I{sysroot}/include', " + - $"'-I{sysroot}/include/c++/current', " + - $"'-I{sysroot}/include/c++/current/{crossCompileToolchainArch}' "; + $"'-I{sysroot}/include/c++/{newestCpp}', " + + $"'-I{sysroot}/include/c++/{newestCpp}/{crossCompileToolchainArch}', " + + $"'-I/usr/include/' "; AppendToFlagList(gnArgs, "extra_asmflags", $"{init}, '-no-integrated-as', {bin}, {includes}"); AppendToFlagList(gnArgs, "extra_ldflags", $"{init}, {bin}, {libs}"); From ab26e9ea68b4f83aa06884151917e3bc7aa5d9cf Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sun, 8 Oct 2023 17:13:36 +0200 Subject: [PATCH 32/54] Cleanup and build order --- .github/workflows/test.yml | 74 -------------------------------------- build/Build.Native.cs | 3 +- 2 files changed, 2 insertions(+), 75 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 6d49adb..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,74 +0,0 @@ -on: - workflow_dispatch: - - pull_request: - -jobs: - test: - runs-on: ubuntu-latest - steps: - - run: sudo apt-get update - - run: sudo apt-get install crossbuild-essential-i386 crossbuild-essential-armhf crossbuild-essential-arm64 - # - run: sudo apt-get install gcc-multilib g++-multilib - - run: | - ls -l /usr/aarch64-linux-gnu - ls -l /usr/aarch64-linux-gnu/bin - ls -l /usr/aarch64-linux-gnu/lib - ls -l /usr/aarch64-linux-gnu/include - ls -l /usr/aarch64-linux-gnu/include/c++/ - ls -l /usr/aarch64-linux-gnu/include/c++/11/ - echo OK - - - run: | - ls -l /usr/arm-linux-gnueabihf - ls -l /usr/arm-linux-gnueabihf/bin - ls -l /usr/arm-linux-gnueabihf/lib - ls -l /usr/arm-linux-gnueabihf/include - ls -l /usr/arm-linux-gnueabihf/include/c++/ - ls -l /usr/arm-linux-gnueabihf/include/c++/11/ - echo OK - - - run: | - ls -l /usr/i686-linux-gnu - ls -l /usr/i686-linux-gnu/bin - ls -l /usr/i686-linux-gnu/lib - ls -l /usr/i686-linux-gnu/include - ls -l /usr/i686-linux-gnu/include/c++/ - ls -l /usr/i686-linux-gnu/include/c++/11/ - echo OK - - - run: sudo dpkg --add-architecture armhf - - run: sudo dpkg --add-architecture arm64 - - run: sudo dpkg --add-architecture i386 - # Limit current sources to amd64 - - run: sudo sed -i "s/deb /deb [arch=amd64,i386] /" /etc/apt/sources.list - - run: sudo sed -i "s/deb-src /deb-src [arch=amd64,i386] /" /etc/apt/sources.list - # Add other archs from ports.ubuntu.com - - run: sudo su -c "echo 'deb [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - - run: sudo su -c "echo 'deb-src [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports jammy main universe' >> /etc/apt/sources.list" - - run: sudo apt-get update - - - run: sudo apt-get -y install aptitude - - - run: sudo aptitude install -y libc6-dev:i386 - - run: sudo aptitude install -y libc6-dev:arm64 - - run: sudo aptitude install -y libc6-dev:armhf - - run: sudo aptitude install -y libfontconfig-dev:i386 - - run: sudo aptitude install -y libfontconfig-dev:arm64 - - run: sudo aptitude install -y libfontconfig-dev:armhf - - - run: | - ls -l /usr/aarch64-linux-gnu/include - ls -l /usr/aarch64-linux-gnu/include/c++/11/ - echo OK - - - run: | - ls -l /usr/arm-linux-gnueabihf/include - ls -l /usr/arm-linux-gnueabihf/include/c++/11/ - echo OK - - - run: | - ls -l /usr/i686-linux-gnu/include - ls -l /usr/i686-linux-gnu/include/c++/11/ - echo OK - diff --git a/build/Build.Native.cs b/build/Build.Native.cs index 2742556..3fa2040 100644 --- a/build/Build.Native.cs +++ b/build/Build.Native.cs @@ -132,7 +132,8 @@ partial class Build .Requires(() => Architecture) .Requires(() => Variant) .Requires(() => TargetOs) - .Before(SetupDepotTools) // ensure it runs before any oher targets + // ensure it runs before any oher targets + .Before(SetupDepotTools, PatchSkiaBuildFiles, GitSyncDepsLibAlphaSkia) .Executes(() => { if (SkipLibAlphaSkia) From a8b9165ffb4f63d7933912b9dbe6c0ef1d4f096f Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sun, 8 Oct 2023 17:18:09 +0200 Subject: [PATCH 33/54] No upgrade --- build/Build.Linux.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index 2f88642..7fcedf7 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -20,7 +20,7 @@ void InstallDependenciesLinux() var arch = Architecture.LinuxArch; sudo($"apt-get update"); - sudo("apt-get upgrade -y"); + sudo("apt-get install -y aptitude"); sudo($"dpkg -add-architecture {arch}"); From e6e021881812a5bb53f62f98b5c3322f647dd993 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sun, 8 Oct 2023 17:18:56 +0200 Subject: [PATCH 34/54] Missing dash --- build/Build.Linux.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index 7fcedf7..8bc339c 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -22,7 +22,7 @@ void InstallDependenciesLinux() sudo($"apt-get update"); sudo("apt-get install -y aptitude"); - sudo($"dpkg -add-architecture {arch}"); + sudo($"dpkg --add-architecture {arch}"); if (arch == Architecture.Arm || arch == Architecture.Arm64) { From 698f80d57e39669ede98cfc07a8e646862302baa Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sun, 8 Oct 2023 17:25:44 +0200 Subject: [PATCH 35/54] Adjust quoting --- build/Build.Linux.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index 8bc339c..1dd524e 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -19,6 +19,7 @@ void InstallDependenciesLinux() bash($"{dependenciesScript}", workingDirectory: SkiaPath); var arch = Architecture.LinuxArch; + sudo($"apt-get update"); sudo("apt-get install -y aptitude"); @@ -26,16 +27,16 @@ void InstallDependenciesLinux() if (arch == Architecture.Arm || arch == Architecture.Arm64) { - sudo("sed -i \"s/deb /deb [arch=amd64,i386] /\" /etc/apt/sources.list"); - sudo("sed -i \"s/deb-src /deb-src [arch=amd64,i386] /\" /etc/apt/sources.list"); + sudo("sed -i 's/deb /deb [arch=amd64,i386] /' /etc/apt/sources.list"); + sudo("sed -i 's/deb-src /deb-src [arch=amd64,i386] /' /etc/apt/sources.list"); sudo( - $"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list\""); + $"su -c \"\"\"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list\"\"\""); sudo( - $"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list\""); + $"su -c \"\"\"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.lis\"\"\""); sudo( - $"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list\""); + $"su -c \"\"\"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list\"\"\""); sudo( - $"su -c \"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list\""); + $"su -c \"\"\"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list\"\"\""); } sudo($"apt-get update"); From 7f36769f9edb5d4a38f87c554b25fe4f01174df4 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sun, 8 Oct 2023 17:30:55 +0200 Subject: [PATCH 36/54] Troubleshoot sources --- build/Build.Linux.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index 1dd524e..e590c8d 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -27,8 +27,9 @@ void InstallDependenciesLinux() if (arch == Architecture.Arm || arch == Architecture.Arm64) { - sudo("sed -i 's/deb /deb [arch=amd64,i386] /' /etc/apt/sources.list"); - sudo("sed -i 's/deb-src /deb-src [arch=amd64,i386] /' /etc/apt/sources.list"); + sudo("sed -i \"\"\"s/deb /deb [arch=amd64,i386] /\"\"\" /etc/apt/sources.list"); + sudo("sed -i \"\"\"s/deb-src /deb-src [arch=amd64,i386] /\"\"\" /etc/apt/sources.list"); + sudo("cat /etc/apt/sources.list"); sudo( $"su -c \"\"\"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list\"\"\""); sudo( From c7adc600a4b4118681b6a845a2edcdcfd451758e Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sun, 8 Oct 2023 17:46:34 +0200 Subject: [PATCH 37/54] Generate shell script --- build/Build.Linux.cs | 50 +++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index e590c8d..e055639 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; using Nuke.Common.IO; using Nuke.Common.Tooling; @@ -19,30 +20,37 @@ void InstallDependenciesLinux() bash($"{dependenciesScript}", workingDirectory: SkiaPath); var arch = Architecture.LinuxArch; - - sudo($"apt-get update"); - sudo("apt-get install -y aptitude"); - sudo($"dpkg --add-architecture {arch}"); - - if (arch == Architecture.Arm || arch == Architecture.Arm64) + // cross compilation + if (Architecture != Architecture.X64) { - sudo("sed -i \"\"\"s/deb /deb [arch=amd64,i386] /\"\"\" /etc/apt/sources.list"); - sudo("sed -i \"\"\"s/deb-src /deb-src [arch=amd64,i386] /\"\"\" /etc/apt/sources.list"); - sudo("cat /etc/apt/sources.list"); - sudo( - $"su -c \"\"\"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list\"\"\""); - sudo( - $"su -c \"\"\"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.lis\"\"\""); - sudo( - $"su -c \"\"\"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list\"\"\""); - sudo( - $"su -c \"\"\"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list\"\"\""); - } + var crossInstallDependencies = new StringBuilder(); + crossInstallDependencies.AppendLine("apt-get update"); + crossInstallDependencies.AppendLine("apt-get install -y aptitude"); + crossInstallDependencies.AppendLine($"dpkg --add-architecture {arch}"); - sudo($"apt-get update"); - sudo($"aptitude install -y crossbuild-essential-{arch} libstdc++-11-dev-{arch}-cross"); - sudo($"aptitude install -y libfontconfig-dev:{arch} libgl1-mesa-dev:{arch} libglu1-mesa-dev:{arch}"); + if (arch == Architecture.Arm || arch == Architecture.Arm64) + { + crossInstallDependencies.AppendLine("sed -i \"s/deb /deb [arch=amd64,i386] /\" /etc/apt/sources.list"); + crossInstallDependencies.AppendLine("sed -i \"s/deb-src /deb-src [arch=amd64,i386] /\" /etc/apt/sources.list"); + crossInstallDependencies.AppendLine("cat /etc/apt/sources.list"); + crossInstallDependencies.AppendLine($"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list"); + crossInstallDependencies.AppendLine( + $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list"); + crossInstallDependencies.AppendLine( + $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list"); + crossInstallDependencies.AppendLine( + $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.lis"); + crossInstallDependencies.AppendLine("apt-get update"); + } + + crossInstallDependencies.AppendLine($"aptitude install -y crossbuild-essential-{arch} libstdc++-11-dev-{arch}-cross"); + crossInstallDependencies.AppendLine($"aptitude install -y libfontconfig-dev:{arch} libgl1-mesa-dev:{arch} libglu1-mesa-dev:{arch}"); + + var scriptFile = SkiaPath / "tools" / "cross_install_dependencies.sh"; + File.WriteAllText(scriptFile, crossInstallDependencies.ToString()); + sudo($"bash {scriptFile}"); + } } void BuildLibAlphaSkiaLinux() From ded9e287939bcf2873bdca45e9d59faecab1ef04 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Mon, 9 Oct 2023 13:17:20 +0200 Subject: [PATCH 38/54] Adjust lib paths --- build/Build.Linux.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index e055639..381b4e9 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -9,7 +9,7 @@ partial class Build { void InstallDependenciesLinux() { - if (!IsGitHubActions) + if (!IsGitHubActions || TargetOs != TargetOperatingSystems.Linux) { return; } @@ -41,11 +41,11 @@ void InstallDependenciesLinux() $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list"); crossInstallDependencies.AppendLine( $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.lis"); - crossInstallDependencies.AppendLine("apt-get update"); } + crossInstallDependencies.AppendLine("apt-get update"); crossInstallDependencies.AppendLine($"aptitude install -y crossbuild-essential-{arch} libstdc++-11-dev-{arch}-cross"); - crossInstallDependencies.AppendLine($"aptitude install -y libfontconfig-dev:{arch} libgl1-mesa-dev:{arch} libglu1-mesa-dev:{arch}"); + crossInstallDependencies.AppendLine($"aptitude install -y libfontconfig-dev:{arch} libgl1-mesa-dev:{arch} libglu1-mesa-dev:{arch} freeglut3-dev:{arch}"); var scriptFile = SkiaPath / "tools" / "cross_install_dependencies.sh"; File.WriteAllText(scriptFile, crossInstallDependencies.ToString()); @@ -139,7 +139,7 @@ void SetClangLinux(Dictionary gnArgs) var sysroot = $"/usr/{crossCompileToolchainArch}"; var init = $"'--sysroot={sysroot}', '--target={crossCompileTargetArch}'"; var bin = $"'-B{sysroot}/bin/' "; - var libs = $"'-L{sysroot}/lib/' "; + var libs = $"'-L{sysroot}/lib/', '-L/usr/lib/{crossCompileToolchainArch}' "; AbsolutePath sysRootPath = sysroot; var newestCpp = Directory.EnumerateDirectories(sysRootPath / "include" / "c++") From 8567d92c53070a17acd12330f25c69cae01e20ea Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Mon, 9 Oct 2023 13:19:35 +0200 Subject: [PATCH 39/54] Fix wrong type name --- build/Build.Linux.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index 381b4e9..3567b45 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -9,7 +9,7 @@ partial class Build { void InstallDependenciesLinux() { - if (!IsGitHubActions || TargetOs != TargetOperatingSystems.Linux) + if (!IsGitHubActions || TargetOs != TargetOperatingSystem.Linux) { return; } From 2b53c044ea3bf9bfdf5286eb8f3bfacf3c7c04ff Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Mon, 9 Oct 2023 13:44:48 +0200 Subject: [PATCH 40/54] Add logs to troubleshoot arm build --- build/Build.Linux.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index 3567b45..343a81f 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -25,26 +25,33 @@ void InstallDependenciesLinux() if (Architecture != Architecture.X64) { var crossInstallDependencies = new StringBuilder(); + crossInstallDependencies.AppendLine("echo Install Aptitude"); crossInstallDependencies.AppendLine("apt-get update"); crossInstallDependencies.AppendLine("apt-get install -y aptitude"); + + crossInstallDependencies.AppendLine($"echo Adding Arch {arch}"); crossInstallDependencies.AppendLine($"dpkg --add-architecture {arch}"); if (arch == Architecture.Arm || arch == Architecture.Arm64) { + crossInstallDependencies.AppendLine("echo Modifying sources.list"); crossInstallDependencies.AppendLine("sed -i \"s/deb /deb [arch=amd64,i386] /\" /etc/apt/sources.list"); crossInstallDependencies.AppendLine("sed -i \"s/deb-src /deb-src [arch=amd64,i386] /\" /etc/apt/sources.list"); - crossInstallDependencies.AppendLine("cat /etc/apt/sources.list"); crossInstallDependencies.AppendLine($"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list"); crossInstallDependencies.AppendLine( $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list"); crossInstallDependencies.AppendLine( $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list"); crossInstallDependencies.AppendLine( - $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.lis"); + $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list"); } - + crossInstallDependencies.AppendLine("echo Installing Dependencies with sources:"); + crossInstallDependencies.AppendLine("cat /etc/apt/sources.list"); + crossInstallDependencies.AppendLine("echo Updating Packages"); crossInstallDependencies.AppendLine("apt-get update"); + crossInstallDependencies.AppendLine("echo Installing main build tools"); crossInstallDependencies.AppendLine($"aptitude install -y crossbuild-essential-{arch} libstdc++-11-dev-{arch}-cross"); + crossInstallDependencies.AppendLine("echo Installing arch libs"); crossInstallDependencies.AppendLine($"aptitude install -y libfontconfig-dev:{arch} libgl1-mesa-dev:{arch} libglu1-mesa-dev:{arch} freeglut3-dev:{arch}"); var scriptFile = SkiaPath / "tools" / "cross_install_dependencies.sh"; @@ -134,7 +141,7 @@ void SetClangLinux(Dictionary gnArgs) AppendToFlagList(gnArgs, "extra_ldflags", "'-static-libstdc++', '-static-libgcc'"); } - if (!string.IsNullOrEmpty(crossCompileToolchainArch)) + if (!string.IsNullOrEmpty(crossCompileToolchainArch) && TargetOs == TargetOperatingSystem.Linux) { var sysroot = $"/usr/{crossCompileToolchainArch}"; var init = $"'--sysroot={sysroot}', '--target={crossCompileTargetArch}'"; From 1c29850338ffc8973721f2b3e9c4d274763da053 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Mon, 9 Oct 2023 14:37:42 +0200 Subject: [PATCH 41/54] More test outputs --- build/Build.Linux.cs | 37 +++++++++---------------------------- build/Build.Native.cs | 10 ++++++---- 2 files changed, 15 insertions(+), 32 deletions(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index 343a81f..e43a0ab 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -53,6 +53,10 @@ void InstallDependenciesLinux() crossInstallDependencies.AppendLine($"aptitude install -y crossbuild-essential-{arch} libstdc++-11-dev-{arch}-cross"); crossInstallDependencies.AppendLine("echo Installing arch libs"); crossInstallDependencies.AppendLine($"aptitude install -y libfontconfig-dev:{arch} libgl1-mesa-dev:{arch} libglu1-mesa-dev:{arch} freeglut3-dev:{arch}"); + crossInstallDependencies.AppendLine("echo Libs"); + crossInstallDependencies.AppendLine($"ls -l /usr/lib/{Architecture.LinuxCrossToolchain}"); + crossInstallDependencies.AppendLine("echo Includes"); + crossInstallDependencies.AppendLine($"ls /usr/{Architecture.LinuxCrossToolchain}/include"); var scriptFile = SkiaPath / "tools" / "cross_install_dependencies.sh"; File.WriteAllText(scriptFile, crossInstallDependencies.ToString()); @@ -111,42 +115,20 @@ void BuildSkiaLinux(string buildTarget, Dictionary gnArgs, void SetClangLinux(Dictionary gnArgs) { AppendToFlagList(gnArgs, "extra_cflags", "'-DHAVE_SYSCALL_GETRANDOM', '-DXML_DEV_URANDOM'"); + AppendToFlagList(gnArgs, "extra_ldflags", "'-static-libstdc++', '-static-libgcc'"); gnArgs["cc"] = "clang"; gnArgs["cxx"] = "'clang++'"; - string crossCompileToolchainArch = null; - string crossCompileTargetArch = null; - if (Architecture == Architecture.X64) - { - AppendToFlagList(gnArgs, "extra_ldflags", "'-static-libstdc++', '-static-libgcc'"); - } - else if (Architecture == Architecture.X86) - { - // TODO - crossCompileToolchainArch = "i686-linux-gnu"; - crossCompileTargetArch = "i686-linux-gnu"; - AppendToFlagList(gnArgs, "extra_ldflags", "'-static-libstdc++', '-static-libgcc'"); - } - else if (Architecture == Architecture.Arm64) - { - crossCompileToolchainArch = "aarch64-linux-gnu"; - crossCompileTargetArch = "aarch64-linux-gnu"; - AppendToFlagList(gnArgs, "extra_ldflags", "'-static-libstdc++', '-static-libgcc'"); - } - else if (Architecture == Architecture.Arm) - { - crossCompileToolchainArch = "arm-linux-gnueabihf"; - crossCompileTargetArch = "armv7a-linux-gnueabihf"; - AppendToFlagList(gnArgs, "extra_ldflags", "'-static-libstdc++', '-static-libgcc'"); - } - + var crossCompileToolchainArch = Architecture.LinuxCrossToolchain; + var crossCompileTargetArch = Architecture.LinuxCrossTargetArch; + if (!string.IsNullOrEmpty(crossCompileToolchainArch) && TargetOs == TargetOperatingSystem.Linux) { var sysroot = $"/usr/{crossCompileToolchainArch}"; var init = $"'--sysroot={sysroot}', '--target={crossCompileTargetArch}'"; var bin = $"'-B{sysroot}/bin/' "; - var libs = $"'-L{sysroot}/lib/', '-L/usr/lib/{crossCompileToolchainArch}' "; + var libs = $"'-L/usr/lib/{crossCompileToolchainArch}'"; AbsolutePath sysRootPath = sysroot; var newestCpp = Directory.EnumerateDirectories(sysRootPath / "include" / "c++") @@ -154,7 +136,6 @@ void SetClangLinux(Dictionary gnArgs) .OrderByDescending(x => x) .First(); - var includes = $"'-I{sysroot}/include', " + $"'-I{sysroot}/include/c++/{newestCpp}', " + diff --git a/build/Build.Native.cs b/build/Build.Native.cs index 3fa2040..7281356 100644 --- a/build/Build.Native.cs +++ b/build/Build.Native.cs @@ -33,12 +33,14 @@ public class TargetOperatingSystem : Enumeration [TypeConverter(typeof(TypeConverter))] public class Architecture : Enumeration { - public static Architecture X64 = new() { Value = "x64", LinuxArch = "amd64" }; - public static Architecture X86 = new() { Value = "x86", LinuxArch = "i386" }; - public static Architecture Arm = new() { Value = "arm", LinuxArch = "armhf" }; - public static Architecture Arm64 = new() { Value = "arm64", LinuxArch = "arm64" }; + public static Architecture X64 = new() { Value = "x64", LinuxArch = "amd64", LinuxCrossToolchain = "", LinuxCrossTargetArch = ""}; + public static Architecture X86 = new() { Value = "x86", LinuxArch = "i386", LinuxCrossToolchain = "i686-linux-gnu", LinuxCrossTargetArch = "i686-linux-gnu"}; + public static Architecture Arm = new() { Value = "arm", LinuxArch = "armhf", LinuxCrossToolchain = "arm-linux-gnueabihf", LinuxCrossTargetArch = "armv7a-linux-gnueabihf"}; + public static Architecture Arm64 = new() { Value = "arm64", LinuxArch = "arm64", LinuxCrossToolchain = "aarch64-linux-gnu", LinuxCrossTargetArch = "aarch64-linux-gnu"}; public string LinuxArch { get; private set; } + public string LinuxCrossToolchain { get; private set; } + public string LinuxCrossTargetArch { get; private set; } } [TypeConverter(typeof(TypeConverter))] From 9ab90b2899869089cdae2cd1c4904a7546fb8eea Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Mon, 9 Oct 2023 15:02:59 +0200 Subject: [PATCH 42/54] Troubleshoot remaining archs --- .github/actions/build-skia/action.yml | 74 +++++++++------------------ .github/workflows/test.yml | 0 build/Build.Linux.cs | 7 +-- 3 files changed, 28 insertions(+), 53 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/actions/build-skia/action.yml b/.github/actions/build-skia/action.yml index cfd040e..4c84528 100644 --- a/.github/actions/build-skia/action.yml +++ b/.github/actions/build-skia/action.yml @@ -1,52 +1,26 @@ -name: 'Build Skia' -description: 'Builds the Skia Native library' -inputs: - use-cache: - description: 'Whether to try using the pre-compiled binary from the cache.' - required: false - default: 'false' - architecture: - description: 'The CPU architecture for which to build the lib' - required: true - variant: - description: 'The library type to build' - required: true - target-os: - description: 'The target Operating system identifier' - required: true - -runs: - using: "composite" - steps: - - uses: actions/cache/restore@v3 - if: ${{ inputs.use-cache }} - with: - path: dist - key: alphaskia-${{ inputs.target-os }}-${{ inputs.architecture }}-${{ inputs.variant }}-${{ github.run_id }} - restore-keys: alphaskia-${{ inputs.target-os }}-${{ inputs.architecture }}-${{ inputs.variant }} - - - id: build-info - run: | - if [ ${{ runner.os }} != 'Windows' ]; then - echo "script=./build.sh" >> "$GITHUB_OUTPUT" - echo "shell=bash" >> "$GITHUB_OUTPUT" - else - echo "script=./build.cmd" >> "$GITHUB_OUTPUT" - echo "shell=pwsh" >> "$GITHUB_OUTPUT" - fi - shell: bash - - - run: ${{ steps.build-info.outputs.script }} LibAlphaSkiaWithCache --target-os ${{ inputs.target-os }} --architecture ${{ inputs.architecture }} --variant ${{ inputs.variant }} --use-cache ${{ inputs.use-cache }} - shell: ${{ steps.build-info.outputs.shell }} - - - uses: actions/upload-artifact@v3 - with: - name: alphaskia-${{ inputs.target-os }}-${{ inputs.architecture }}-${{ inputs.variant }} - path: artifacts - - - uses: actions/cache/save@v3 - with: - path: dist - key: alphaskia-${{ inputs.target-os }}-${{ inputs.architecture }}-${{ inputs.variant }}-${{ github.run_id }} +on: + pull_request: + workflow_dispatch: +jobs: + test: + runs-on: ubuntu-latest + steps: + - run: sudo apt-get update + - run: sudo apt-get install -y aptitude + - run: sudo dpkg --add-architecture armhf + - run: sudo sed -i "s/deb /deb [arch=amd64,i386] /" /etc/apt/sources.list + - run: sudo sed -i "s/deb-src /deb-src [arch=amd64,i386] /" /etc/apt/sources.list + - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list" + - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list" + - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list" + - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list" + - run: sudo apt-get update + - run: sudo aptitude install -y crossbuild-essential-armhf libstdc++-11-dev-armhf-cross + - run: sudo aptitude install -y aptitude install -y libfontconfig-dev:armhf libgl1-mesa-dev:armhf libglu1-mesa-dev:armhf freeglut3-dev:armhf + - run: ls /usr + - run: ls /usr/lib + - run: ls /usr/lib/arm-linux-gnueabihf + - run: ls /usr/arm-linux-gnueabihf/include + \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e69de29 diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index e43a0ab..e15204b 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -32,11 +32,12 @@ void InstallDependenciesLinux() crossInstallDependencies.AppendLine($"echo Adding Arch {arch}"); crossInstallDependencies.AppendLine($"dpkg --add-architecture {arch}"); + crossInstallDependencies.AppendLine("echo Modifying sources.list"); + crossInstallDependencies.AppendLine("sed -i \"s/deb /deb [arch=amd64,i386] /\" /etc/apt/sources.list"); + crossInstallDependencies.AppendLine("sed -i \"s/deb-src /deb-src [arch=amd64,i386] /\" /etc/apt/sources.list"); + if (arch == Architecture.Arm || arch == Architecture.Arm64) { - crossInstallDependencies.AppendLine("echo Modifying sources.list"); - crossInstallDependencies.AppendLine("sed -i \"s/deb /deb [arch=amd64,i386] /\" /etc/apt/sources.list"); - crossInstallDependencies.AppendLine("sed -i \"s/deb-src /deb-src [arch=amd64,i386] /\" /etc/apt/sources.list"); crossInstallDependencies.AppendLine($"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list"); crossInstallDependencies.AppendLine( $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list"); From 653a89abe5fcfc36699cfd339ddad5fc50b2e712 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Mon, 9 Oct 2023 15:04:31 +0200 Subject: [PATCH 43/54] Trigger again --- .github/actions/build-skia/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-skia/action.yml b/.github/actions/build-skia/action.yml index 4c84528..bc1fb92 100644 --- a/.github/actions/build-skia/action.yml +++ b/.github/actions/build-skia/action.yml @@ -1,6 +1,6 @@ on: - pull_request: workflow_dispatch: + pull_request: jobs: test: From c01dbfefb7679563bd60a90695f28b2fad7f897c Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Mon, 9 Oct 2023 15:05:42 +0200 Subject: [PATCH 44/54] change syntax --- .github/actions/build-skia/action.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/actions/build-skia/action.yml b/.github/actions/build-skia/action.yml index bc1fb92..3b2f9d7 100644 --- a/.github/actions/build-skia/action.yml +++ b/.github/actions/build-skia/action.yml @@ -1,6 +1,4 @@ -on: - workflow_dispatch: - pull_request: +on: [workflow_dispatch, pull_request] jobs: test: @@ -22,5 +20,3 @@ jobs: - run: ls /usr/lib - run: ls /usr/lib/arm-linux-gnueabihf - run: ls /usr/arm-linux-gnueabihf/include - - \ No newline at end of file From 122a5513ad1eaf774117ba6993ff4438fb8094c5 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Mon, 9 Oct 2023 15:08:27 +0200 Subject: [PATCH 45/54] Modify correct file --- .github/actions/build-skia/action.yml | 70 +++++++++++++++++++-------- .github/workflows/test.yml | 22 +++++++++ 2 files changed, 71 insertions(+), 21 deletions(-) diff --git a/.github/actions/build-skia/action.yml b/.github/actions/build-skia/action.yml index 3b2f9d7..f8be8c3 100644 --- a/.github/actions/build-skia/action.yml +++ b/.github/actions/build-skia/action.yml @@ -1,22 +1,50 @@ -on: [workflow_dispatch, pull_request] +name: 'Build Skia' +description: 'Builds the Skia Native library' +inputs: + use-cache: + description: 'Whether to try using the pre-compiled binary from the cache.' + required: false + default: 'false' + architecture: + description: 'The CPU architecture for which to build the lib' + required: true + variant: + description: 'The library type to build' + required: true + target-os: + description: 'The target Operating system identifier' + required: true -jobs: - test: - runs-on: ubuntu-latest - steps: - - run: sudo apt-get update - - run: sudo apt-get install -y aptitude - - run: sudo dpkg --add-architecture armhf - - run: sudo sed -i "s/deb /deb [arch=amd64,i386] /" /etc/apt/sources.list - - run: sudo sed -i "s/deb-src /deb-src [arch=amd64,i386] /" /etc/apt/sources.list - - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list" - - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list" - - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list" - - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list" - - run: sudo apt-get update - - run: sudo aptitude install -y crossbuild-essential-armhf libstdc++-11-dev-armhf-cross - - run: sudo aptitude install -y aptitude install -y libfontconfig-dev:armhf libgl1-mesa-dev:armhf libglu1-mesa-dev:armhf freeglut3-dev:armhf - - run: ls /usr - - run: ls /usr/lib - - run: ls /usr/lib/arm-linux-gnueabihf - - run: ls /usr/arm-linux-gnueabihf/include +runs: + using: "composite" + steps: + - uses: actions/cache/restore@v3 + if: ${{ inputs.use-cache }} + with: + path: dist + key: alphaskia-${{ inputs.target-os }}-${{ inputs.architecture }}-${{ inputs.variant }}-${{ github.run_id }} + restore-keys: alphaskia-${{ inputs.target-os }}-${{ inputs.architecture }}-${{ inputs.variant }} + + - id: build-info + run: | + if [ ${{ runner.os }} != 'Windows' ]; then + echo "script=./build.sh" >> "$GITHUB_OUTPUT" + echo "shell=bash" >> "$GITHUB_OUTPUT" + else + echo "script=./build.cmd" >> "$GITHUB_OUTPUT" + echo "shell=pwsh" >> "$GITHUB_OUTPUT" + fi + shell: bash + + - run: ${{ steps.build-info.outputs.script }} LibAlphaSkiaWithCache --target-os ${{ inputs.target-os }} --architecture ${{ inputs.architecture }} --variant ${{ inputs.variant }} --use-cache ${{ inputs.use-cache }} + shell: ${{ steps.build-info.outputs.shell }} + + - uses: actions/upload-artifact@v3 + with: + name: alphaskia-${{ inputs.target-os }}-${{ inputs.architecture }}-${{ inputs.variant }} + path: artifacts + + - uses: actions/cache/save@v3 + with: + path: dist + key: alphaskia-${{ inputs.target-os }}-${{ inputs.architecture }}-${{ inputs.variant }}-${{ github.run_id }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e69de29..3b2f9d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +on: [workflow_dispatch, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - run: sudo apt-get update + - run: sudo apt-get install -y aptitude + - run: sudo dpkg --add-architecture armhf + - run: sudo sed -i "s/deb /deb [arch=amd64,i386] /" /etc/apt/sources.list + - run: sudo sed -i "s/deb-src /deb-src [arch=amd64,i386] /" /etc/apt/sources.list + - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list" + - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list" + - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list" + - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list" + - run: sudo apt-get update + - run: sudo aptitude install -y crossbuild-essential-armhf libstdc++-11-dev-armhf-cross + - run: sudo aptitude install -y aptitude install -y libfontconfig-dev:armhf libgl1-mesa-dev:armhf libglu1-mesa-dev:armhf freeglut3-dev:armhf + - run: ls /usr + - run: ls /usr/lib + - run: ls /usr/lib/arm-linux-gnueabihf + - run: ls /usr/arm-linux-gnueabihf/include From 0e4da769159dcb12d9bee161270121915bcb69c4 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Mon, 9 Oct 2023 15:11:22 +0200 Subject: [PATCH 46/54] Fix double aptitude --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b2f9d7..d98ce78 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list" - run: sudo apt-get update - run: sudo aptitude install -y crossbuild-essential-armhf libstdc++-11-dev-armhf-cross - - run: sudo aptitude install -y aptitude install -y libfontconfig-dev:armhf libgl1-mesa-dev:armhf libglu1-mesa-dev:armhf freeglut3-dev:armhf + - run: sudo aptitude install -y libfontconfig-dev:armhf libgl1-mesa-dev:armhf libglu1-mesa-dev:armhf freeglut3-dev:armhf - run: ls /usr - run: ls /usr/lib - run: ls /usr/lib/arm-linux-gnueabihf From 8bd85db97eeb82653d290100b56cdc203e1cd8c4 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Wed, 11 Oct 2023 13:16:09 +0200 Subject: [PATCH 47/54] Remove include path --- build/Build.Linux.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index e15204b..339790e 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -140,8 +140,7 @@ void SetClangLinux(Dictionary gnArgs) var includes = $"'-I{sysroot}/include', " + $"'-I{sysroot}/include/c++/{newestCpp}', " + - $"'-I{sysroot}/include/c++/{newestCpp}/{crossCompileToolchainArch}', " + - $"'-I/usr/include/' "; + $"'-I{sysroot}/include/c++/{newestCpp}/{crossCompileToolchainArch}'"; AppendToFlagList(gnArgs, "extra_asmflags", $"{init}, '-no-integrated-as', {bin}, {includes}"); AppendToFlagList(gnArgs, "extra_ldflags", $"{init}, {bin}, {libs}"); From adadc5af50ae1db725c910bdd670917f03b0f22b Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Wed, 11 Oct 2023 13:23:07 +0200 Subject: [PATCH 48/54] Tweak include paths --- .github/workflows/test.yml | 22 ---------------------- build/Build.Linux.cs | 6 +++++- 2 files changed, 5 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index d98ce78..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,22 +0,0 @@ -on: [workflow_dispatch, pull_request] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - run: sudo apt-get update - - run: sudo apt-get install -y aptitude - - run: sudo dpkg --add-architecture armhf - - run: sudo sed -i "s/deb /deb [arch=amd64,i386] /" /etc/apt/sources.list - - run: sudo sed -i "s/deb-src /deb-src [arch=amd64,i386] /" /etc/apt/sources.list - - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list" - - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list" - - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list" - - run: sudo su -c "echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list" - - run: sudo apt-get update - - run: sudo aptitude install -y crossbuild-essential-armhf libstdc++-11-dev-armhf-cross - - run: sudo aptitude install -y libfontconfig-dev:armhf libgl1-mesa-dev:armhf libglu1-mesa-dev:armhf freeglut3-dev:armhf - - run: ls /usr - - run: ls /usr/lib - - run: ls /usr/lib/arm-linux-gnueabihf - - run: ls /usr/arm-linux-gnueabihf/include diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index 339790e..ac53c9d 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -140,7 +140,11 @@ void SetClangLinux(Dictionary gnArgs) var includes = $"'-I{sysroot}/include', " + $"'-I{sysroot}/include/c++/{newestCpp}', " + - $"'-I{sysroot}/include/c++/{newestCpp}/{crossCompileToolchainArch}'"; + $"'-I{sysroot}/include/c++/{newestCpp}/{crossCompileToolchainArch}', " + + $"'-I/usr/include/{crossCompileToolchainArch}', " + + // last fallback to main headers. this can lead to wierd compilation errors if actually an arch specific header is required + // in such cases we have to find out which headers are wrongly included and install potentially missing packages. + $"'-I/usr/include/' "; AppendToFlagList(gnArgs, "extra_asmflags", $"{init}, '-no-integrated-as', {bin}, {includes}"); AppendToFlagList(gnArgs, "extra_ldflags", $"{init}, {bin}, {libs}"); From 653ae0f308e5396b7bdc2162ba2f67f167711788 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Wed, 11 Oct 2023 14:02:03 +0200 Subject: [PATCH 49/54] Ensure /usr/include is at the end --- build/Build.Linux.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index ac53c9d..73a47ef 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -144,7 +144,8 @@ void SetClangLinux(Dictionary gnArgs) $"'-I/usr/include/{crossCompileToolchainArch}', " + // last fallback to main headers. this can lead to wierd compilation errors if actually an arch specific header is required // in such cases we have to find out which headers are wrongly included and install potentially missing packages. - $"'-I/usr/include/' "; + // executing the failed clang/clang++ command with additionally "-H -fshow-skipped-includes" can help finding the problematic headers + $"'-isystem/usr/include/' "; AppendToFlagList(gnArgs, "extra_asmflags", $"{init}, '-no-integrated-as', {bin}, {includes}"); AppendToFlagList(gnArgs, "extra_ldflags", $"{init}, {bin}, {libs}"); From 7be7a97f75fb922122e7a0baafe29922e16bfae0 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Wed, 11 Oct 2023 14:12:52 +0200 Subject: [PATCH 50/54] Adjust settings --- build/Build.Linux.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index 73a47ef..bc2a09b 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -27,7 +27,7 @@ void InstallDependenciesLinux() var crossInstallDependencies = new StringBuilder(); crossInstallDependencies.AppendLine("echo Install Aptitude"); crossInstallDependencies.AppendLine("apt-get update"); - crossInstallDependencies.AppendLine("apt-get install -y aptitude"); + // crossInstallDependencies.AppendLine("apt-get install -y aptitude"); crossInstallDependencies.AppendLine($"echo Adding Arch {arch}"); crossInstallDependencies.AppendLine($"dpkg --add-architecture {arch}"); @@ -127,7 +127,7 @@ void SetClangLinux(Dictionary gnArgs) if (!string.IsNullOrEmpty(crossCompileToolchainArch) && TargetOs == TargetOperatingSystem.Linux) { var sysroot = $"/usr/{crossCompileToolchainArch}"; - var init = $"'--sysroot={sysroot}', '--target={crossCompileTargetArch}'"; + var init = $"'--target={crossCompileTargetArch}'"; var bin = $"'-B{sysroot}/bin/' "; var libs = $"'-L/usr/lib/{crossCompileToolchainArch}'"; From 4cb9abd77ab7e2cbd5b24111cccea47af478d228 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Wed, 11 Oct 2023 14:14:43 +0200 Subject: [PATCH 51/54] Re-add aptitude --- build/Build.Linux.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index bc2a09b..ff535c5 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -27,7 +27,7 @@ void InstallDependenciesLinux() var crossInstallDependencies = new StringBuilder(); crossInstallDependencies.AppendLine("echo Install Aptitude"); crossInstallDependencies.AppendLine("apt-get update"); - // crossInstallDependencies.AppendLine("apt-get install -y aptitude"); + crossInstallDependencies.AppendLine("apt-get install -y aptitude"); crossInstallDependencies.AppendLine($"echo Adding Arch {arch}"); crossInstallDependencies.AppendLine($"dpkg --add-architecture {arch}"); From e7047737a89e6252dde2d439e9786e56e033275b Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Wed, 11 Oct 2023 15:41:46 +0200 Subject: [PATCH 52/54] Fail fast on errors --- build/Build.Linux.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index ff535c5..c54da0f 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -25,6 +25,12 @@ void InstallDependenciesLinux() if (Architecture != Architecture.X64) { var crossInstallDependencies = new StringBuilder(); + crossInstallDependencies.AppendLine("#!/bin/bash"); + crossInstallDependencies.AppendLine("set -e"); + + // Using aptitude here because github actions runners have quite some packages preinstalled + // which leads to many version conflicts after adding more sources. aptitude can resolve those + // conflicts easier crossInstallDependencies.AppendLine("echo Install Aptitude"); crossInstallDependencies.AppendLine("apt-get update"); crossInstallDependencies.AppendLine("apt-get install -y aptitude"); @@ -46,18 +52,12 @@ void InstallDependenciesLinux() crossInstallDependencies.AppendLine( $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list"); } - crossInstallDependencies.AppendLine("echo Installing Dependencies with sources:"); - crossInstallDependencies.AppendLine("cat /etc/apt/sources.list"); crossInstallDependencies.AppendLine("echo Updating Packages"); crossInstallDependencies.AppendLine("apt-get update"); crossInstallDependencies.AppendLine("echo Installing main build tools"); crossInstallDependencies.AppendLine($"aptitude install -y crossbuild-essential-{arch} libstdc++-11-dev-{arch}-cross"); crossInstallDependencies.AppendLine("echo Installing arch libs"); crossInstallDependencies.AppendLine($"aptitude install -y libfontconfig-dev:{arch} libgl1-mesa-dev:{arch} libglu1-mesa-dev:{arch} freeglut3-dev:{arch}"); - crossInstallDependencies.AppendLine("echo Libs"); - crossInstallDependencies.AppendLine($"ls -l /usr/lib/{Architecture.LinuxCrossToolchain}"); - crossInstallDependencies.AppendLine("echo Includes"); - crossInstallDependencies.AppendLine($"ls /usr/{Architecture.LinuxCrossToolchain}/include"); var scriptFile = SkiaPath / "tools" / "cross_install_dependencies.sh"; File.WriteAllText(scriptFile, crossInstallDependencies.ToString()); @@ -142,9 +142,7 @@ void SetClangLinux(Dictionary gnArgs) $"'-I{sysroot}/include/c++/{newestCpp}', " + $"'-I{sysroot}/include/c++/{newestCpp}/{crossCompileToolchainArch}', " + $"'-I/usr/include/{crossCompileToolchainArch}', " + - // last fallback to main headers. this can lead to wierd compilation errors if actually an arch specific header is required - // in such cases we have to find out which headers are wrongly included and install potentially missing packages. - // executing the failed clang/clang++ command with additionally "-H -fshow-skipped-includes" can help finding the problematic headers + // non arch specific headers last (as system header to ensure it is really last, normal -I will fail) $"'-isystem/usr/include/' "; AppendToFlagList(gnArgs, "extra_asmflags", $"{init}, '-no-integrated-as', {bin}, {includes}"); From 7e69050b20b33d2d46fc3e1ac5b9c66d92addd23 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Wed, 11 Oct 2023 15:46:07 +0200 Subject: [PATCH 53/54] Correct conditional for arch --- build/Build.Linux.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index c54da0f..c54e7bb 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -42,7 +42,7 @@ void InstallDependenciesLinux() crossInstallDependencies.AppendLine("sed -i \"s/deb /deb [arch=amd64,i386] /\" /etc/apt/sources.list"); crossInstallDependencies.AppendLine("sed -i \"s/deb-src /deb-src [arch=amd64,i386] /\" /etc/apt/sources.list"); - if (arch == Architecture.Arm || arch == Architecture.Arm64) + if (Architecture == Architecture.Arm || Architecture == Architecture.Arm64) { crossInstallDependencies.AppendLine($"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list"); crossInstallDependencies.AppendLine( From c6124968dc59d99fbb4b8a40c9353ab79b3c9d3b Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Wed, 11 Oct 2023 16:12:19 +0200 Subject: [PATCH 54/54] Install dependencies on JNI build --- build/Build.Linux.cs | 31 +++++++++++++++++-------------- build/Build.Native.cs | 6 ++++++ 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/build/Build.Linux.cs b/build/Build.Linux.cs index c54e7bb..41a9389 100644 --- a/build/Build.Linux.cs +++ b/build/Build.Linux.cs @@ -9,7 +9,7 @@ partial class Build { void InstallDependenciesLinux() { - if (!IsGitHubActions || TargetOs != TargetOperatingSystem.Linux) + if (!IsGitHubActions) { return; } @@ -17,13 +17,16 @@ void InstallDependenciesLinux() var bash = ToolResolver.GetPathTool("bash"); var sudo = ToolResolver.GetPathTool("sudo"); var dependenciesScript = SkiaPath / "tools" / "install_dependencies.sh"; - bash($"{dependenciesScript}", workingDirectory: SkiaPath); - - var arch = Architecture.LinuxArch; + if (dependenciesScript.FileExists()) + { + bash($"{dependenciesScript}", workingDirectory: SkiaPath); + } - // cross compilation - if (Architecture != Architecture.X64) + // Linux cross compilation + if (Architecture != Architecture.X64 && TargetOs == TargetOperatingSystem.Linux) { + var linuxArch = Architecture.LinuxArch; + var crossInstallDependencies = new StringBuilder(); crossInstallDependencies.AppendLine("#!/bin/bash"); crossInstallDependencies.AppendLine("set -e"); @@ -35,8 +38,8 @@ void InstallDependenciesLinux() crossInstallDependencies.AppendLine("apt-get update"); crossInstallDependencies.AppendLine("apt-get install -y aptitude"); - crossInstallDependencies.AppendLine($"echo Adding Arch {arch}"); - crossInstallDependencies.AppendLine($"dpkg --add-architecture {arch}"); + crossInstallDependencies.AppendLine($"echo Adding Arch {linuxArch}"); + crossInstallDependencies.AppendLine($"dpkg --add-architecture {linuxArch}"); crossInstallDependencies.AppendLine("echo Modifying sources.list"); crossInstallDependencies.AppendLine("sed -i \"s/deb /deb [arch=amd64,i386] /\" /etc/apt/sources.list"); @@ -44,20 +47,20 @@ void InstallDependenciesLinux() if (Architecture == Architecture.Arm || Architecture == Architecture.Arm64) { - crossInstallDependencies.AppendLine($"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list"); + crossInstallDependencies.AppendLine($"echo 'deb [arch={linuxArch}] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse universe' >> /etc/apt/sources.list"); crossInstallDependencies.AppendLine( - $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list"); + $"echo 'deb [arch={linuxArch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main multiverse universe' >> /etc/apt/sources.list"); crossInstallDependencies.AppendLine( - $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list"); + $"echo 'deb [arch={linuxArch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main multiverse universe' >> /etc/apt/sources.list"); crossInstallDependencies.AppendLine( - $"echo 'deb [arch={arch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list"); + $"echo 'deb [arch={linuxArch}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse universe' >> /etc/apt/sources.list"); } crossInstallDependencies.AppendLine("echo Updating Packages"); crossInstallDependencies.AppendLine("apt-get update"); crossInstallDependencies.AppendLine("echo Installing main build tools"); - crossInstallDependencies.AppendLine($"aptitude install -y crossbuild-essential-{arch} libstdc++-11-dev-{arch}-cross"); + crossInstallDependencies.AppendLine($"aptitude install -y crossbuild-essential-{linuxArch} libstdc++-11-dev-{linuxArch}-cross"); crossInstallDependencies.AppendLine("echo Installing arch libs"); - crossInstallDependencies.AppendLine($"aptitude install -y libfontconfig-dev:{arch} libgl1-mesa-dev:{arch} libglu1-mesa-dev:{arch} freeglut3-dev:{arch}"); + crossInstallDependencies.AppendLine($"aptitude install -y libfontconfig-dev:{linuxArch} libgl1-mesa-dev:{linuxArch} libglu1-mesa-dev:{linuxArch} freeglut3-dev:{linuxArch}"); var scriptFile = SkiaPath / "tools" / "cross_install_dependencies.sh"; File.WriteAllText(scriptFile, crossInstallDependencies.ToString()); diff --git a/build/Build.Native.cs b/build/Build.Native.cs index 7281356..a40b9e7 100644 --- a/build/Build.Native.cs +++ b/build/Build.Native.cs @@ -187,6 +187,12 @@ partial class Build .Requires(() => TargetOs) .Executes(() => { + GitTool("submodule update --init --recursive"); + if (OperatingSystem.IsLinux()) + { + InstallDependenciesLinux(); + } + if (TargetOs == TargetOperatingSystem.Windows) { BuildLibAlphaSkiaJniWindows();