From 67c87af99e7757faaf553e776e659c2546c256db Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 5 Dec 2023 11:32:14 +0100 Subject: [PATCH] More CI fixups Signed-off-by: falkTX --- .github/workflows/bootstrap-deps.sh | 36 +++++++++++++++++---- .github/workflows/bootstrap.yml | 50 +++++++++++++++++++++-------- 2 files changed, 66 insertions(+), 20 deletions(-) diff --git a/.github/workflows/bootstrap-deps.sh b/.github/workflows/bootstrap-deps.sh index 0ad73e4..a77d460 100755 --- a/.github/workflows/bootstrap-deps.sh +++ b/.github/workflows/bootstrap-deps.sh @@ -16,36 +16,58 @@ function get_linux_deb_arch() { "linux-i686") echo "i386" ;; "linux-riscv64") echo "riscv64" ;; "linux-x86_64") echo "amd64" ;; - "win32"|"win64") echo "i386" ;; esac } function install_compiler() { case "${1}" in "linux-aarch64") - apt-get install -yqq g++-aarch64-linux-gnu + if [ "$(uname -m)" != "aarch64" ]; then + apt-get install -yqq g++-aarch64-linux-gnu + else + apt-get install -yqq g++ + fi ;; "linux-armhf") - apt-get install -yqq g++-arm-linux-gnueabihf + if [ "$(uname -m)" != "armhf" ]; then + apt-get install -yqq g++-arm-linux-gnueabihf + else + apt-get install -yqq g++ + fi ;; "linux-i686") - apt-get install -yqq g++-i686-linux-gnu + if [ "$(uname -m)" != "i686" ]; then + apt-get install -yqq g++-i686-linux-gnu + else + apt-get install -yqq g++ + fi ;; "linux-riscv64") - apt-get install -yqq g++-riscv64-linux-gnu + if [ "$(uname -m)" != "riscv64" ]; then + apt-get install -yqq g++-riscv64-linux-gnu + else + apt-get install -yqq g++ + fi ;; "linux-x86_64") - # FIXME this assumes build runner is x86_64 - apt-get install -yqq g++ + if [ "$(uname -m)" != "x86_64" ]; then + apt-get install -yqq g++-x86_64-linux-gnu + else + apt-get install -yqq g++ + fi ;; "wasm") [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk cd ~/PawPawBuilds/emsdk && ./emsdk install ${EMSCRIPTEN_VERSION} && ./emsdk activate ${EMSCRIPTEN_VERSION} ;; "win32") + dpkg --add-architecture i386 + apt-get update -qq apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable ;; "win64") + dpkg --add-architecture i386 + apt-get update -qq apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable ;; esac diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index 32fe54d..d6aee55 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 3 + CACHE_VERSION: 1 DEBIAN_FRONTEND: noninteractive EMSCRIPTEN_VERSION: 3.1.27 PAWPAW_SKIP_TESTS: 1 @@ -14,13 +14,43 @@ jobs: strategy: matrix: include: + # macos + - target: macos + os: macos-11 + - target: macos-universal + os: macos-11 + - target: macos-universal-10.15 + os: macos-11 + # ubuntu:20.04 - target: linux-aarch64 os: ubuntu-latest - container: ubuntu:22.04 + container: ubuntu:20.04 - target: linux-armhf os: ubuntu-latest - container: ubuntu:22.04 + container: ubuntu:20.04 - target: linux-i686 + os: ubuntu-latest + container: ubuntu:20.04 + - target: linux-riscv64 + os: ubuntu-latest + container: ubuntu:20.04 + - target: linux-x86_64 + os: ubuntu-latest + container: ubuntu:20.04 + - target: wasm + os: ubuntu-latest + container: ubuntu:20.04 + - target: win32 + os: ubuntu-latest + container: ubuntu:20.04 + - target: win64 + os: ubuntu-latest + container: ubuntu:20.04 + # ubuntu:22.04 + - target: linux-aarch64 + os: ubuntu-latest + container: ubuntu:22.04 + - target: linux-armhf os: ubuntu-latest container: ubuntu:22.04 - target: linux-riscv64 @@ -29,12 +59,6 @@ jobs: - target: linux-x86_64 os: ubuntu-latest container: ubuntu:22.04 - - target: macos - os: macos-11 - - target: macos-universal - os: macos-11 - - target: macos-universal-10.15 - os: macos-11 - target: wasm os: ubuntu-latest container: ubuntu:22.04 @@ -54,7 +78,7 @@ jobs: with: path: | ~/PawPawBuilds - key: common-${{ matrix.target }}-v${{ env.CACHE_VERSION }} + key: common-${{ matrix.container }}-${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Set up dependencies run: | ./.github/workflows/bootstrap-deps.sh ${{ matrix.target }} @@ -68,11 +92,11 @@ jobs: - name: Pack bootstrap build shell: bash run: | - tar -C ~/PawPawBuilds -czf common-${{ matrix.target }}.tar.gz builds targets + tar -C ~/PawPawBuilds -czf common-${{ matrix.container }}-${{ matrix.target }}.tar.gz builds targets - uses: actions/upload-artifact@v3 with: - name: common-${{ matrix.target }} - path: common-${{ matrix.target }}.tar.gz + name: common-${{ matrix.container }}-${{ matrix.target }} + path: common-${{ matrix.container }}-${{ matrix.target }}.tar.gz #plugins: #strategy: