Skip to content

Commit

Permalink
More CI fixups
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Dec 5, 2023
1 parent b7f9993 commit 5dc55e6
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 18 deletions.
36 changes: 29 additions & 7 deletions .github/workflows/bootstrap-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -14,6 +14,18 @@ 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:20.04
# ubuntu:22.04
- target: linux-aarch64
os: ubuntu-latest
container: ubuntu:22.04
Expand All @@ -29,12 +41,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
Expand All @@ -54,7 +60,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 }}
Expand All @@ -68,11 +74,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:
Expand Down

0 comments on commit 5dc55e6

Please sign in to comment.