diff options
author | Philipp Janda <siffiejoe@gmx.net> | 2020-11-11 15:13:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-11 15:13:50 +0100 |
commit | 09d8705ecec2347c16b93ef90125a037fa4ff743 (patch) | |
tree | 2c60946769b6bf621f0eb7e81d42b9dd896fc6c7 | |
parent | 1e31f3ddc517b4e521c73f7d6eaecd5e1787daa6 (diff) | |
download | lua-compat-5.3-09d8705ecec2347c16b93ef90125a037fa4ff743.tar.gz lua-compat-5.3-09d8705ecec2347c16b93ef90125a037fa4ff743.tar.bz2 lua-compat-5.3-09d8705ecec2347c16b93ef90125a037fa4ff743.zip |
Multi arch tests (#50)
-rw-r--r-- | .github/workflows/bit32-multi-arch-tests.yml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/bit32-multi-arch-tests.yml b/.github/workflows/bit32-multi-arch-tests.yml new file mode 100644 index 0000000..befef38 --- /dev/null +++ b/.github/workflows/bit32-multi-arch-tests.yml | |||
@@ -0,0 +1,51 @@ | |||
1 | name: bit32-multi-arch-tests | ||
2 | on: | ||
3 | push: | ||
4 | branches: ["master"] | ||
5 | pull_request: | ||
6 | jobs: | ||
7 | bit32-test: | ||
8 | runs-on: ubuntu-latest | ||
9 | name: bit32 tests on ${{ matrix.luaVersion }} ${{ matrix.arch }} | ||
10 | strategy: | ||
11 | fail-fast: false | ||
12 | matrix: | ||
13 | luaVersion: ["5.1.5", "5.4.1"] | ||
14 | luaRocksVersion: ["3.3.1"] | ||
15 | arch: ["armv7", "aarch64"] | ||
16 | steps: | ||
17 | - uses: actions/checkout@v2 | ||
18 | - uses: actions/cache@v2 | ||
19 | id: lua-cache | ||
20 | with: | ||
21 | path: .install/${{ matrix.arch }}/lua-${{ matrix.luaVersion }} | ||
22 | key: lua-on-linux-${{ matrix.arch }}-${{ matrix.luaVersion }} | ||
23 | - uses: uraimo/run-on-arch-action@v2.0.7 | ||
24 | with: | ||
25 | arch: ${{ matrix.arch }} | ||
26 | distro: ubuntu20.04 | ||
27 | githubToken: ${{ github.token }} | ||
28 | setup: | | ||
29 | mkdir -p ".install/${{ matrix.arch }}" | ||
30 | install: | | ||
31 | apt-get update -q -y | ||
32 | apt-get install -q -y curl unzip build-essential libreadline-dev libncurses-dev | ||
33 | rm -rf /var/lib/apt/lists/* | ||
34 | run: | | ||
35 | v() { | ||
36 | echo -n -e "\033[36m" >&2 | ||
37 | echo -n "# $*" >&2 | ||
38 | echo -e "\033[0m" >&2 | ||
39 | "$@" | ||
40 | } | ||
41 | if [ "${{ steps.lua-cache.outputs.cache-hit }}" != true ]; then | ||
42 | (set -o pipefail; cd ".install/${{ matrix.arch }}" && v curl --fail --silent --location "http://www.lua.org/ftp/lua-${{ matrix.luaVersion }}.tar.gz" | tar xzpf -) | ||
43 | (cd ".install/${{ matrix.arch }}/lua-${{ matrix.luaVersion }}" && v make linux) | ||
44 | fi | ||
45 | (cd ".install/${{ matrix.arch }}/lua-${{ matrix.luaVersion }}" && v make install) | ||
46 | (set -o pipefail; cd .install && v curl --fail --silent --location "http://luarocks.org/releases/luarocks-${{ matrix.luaRocksVersion }}.tar.gz" | tar xzpf -) | ||
47 | (cd ".install/luarocks-${{ matrix.luaRocksVersion }}" && v ./configure && v make bootstrap) | ||
48 | eval "$(luarocks path)" | ||
49 | v luarocks make rockspecs/bit32-scm-1.rockspec | ||
50 | v lua tests/test-bit32.lua | ||
51 | |||