77 push :
88 branches :
99 - master
10+ - ' v*.*.*'
1011 tags :
1112 - " *"
1213 pull_request :
2425 matrix :
2526 include :
2627 - { os: ubuntu-22.04, target: linux, platform: linux-x64, container: 'alpine:latest', libc: musl }
27- - { os: ubuntu-20.04, target: linux, platform: linux-x64, container: 'ubuntu:18.04' }
28- - { os: ubuntu-20.04, target: linux, platform: linux-arm64, container: 'ubuntu:18.04' }
28+ - { os: ubuntu-20.04, target: linux, platform: linux-x64 }
29+ - { os: ubuntu-20.04, target: linux, platform: linux-arm64 }
2930 - { os: macos-11, target: darwin, platform: darwin-x64 }
3031 - { os: macos-11, target: darwin, platform: darwin-arm64 }
3132 - { os: windows-latest, target: windows, platform: win32-ia32 }
@@ -34,49 +35,48 @@ jobs:
3435 container :
3536 image : ${{ matrix.container }}
3637 steps :
37- - name : Prepare container
38- if : ${{ matrix.target == 'linux' && matrix.libc != 'musl' }}
39- run : |
40- apt-get update
41- apt-get install -y software-properties-common
42- add-apt-repository -y ppa:ubuntu-toolchain-r/test # For gcc-9 and g++-9
43- add-apt-repository -y ppa:git-core/ppa # For git>=2.18.
44- apt-get update
45- apt-get install -y sudo git gcc-9 g++-9
46-
4738 - name : Install aarch64-linux-gnu
4839 if : ${{ matrix.platform == 'linux-arm64' && matrix.libc != 'musl' }}
4940 run : |
50- apt-get update
51- apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
52-
53- - name : Prepare container env
54- if : ${{ matrix.target == 'linux' && matrix.libc != 'musl' }}
55- run : |
56- update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100
57- update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100
41+ sudo apt-get update
42+ sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
5843
5944 - name : Prepare container for musl
6045 if : ${{ matrix.target == 'linux' && matrix.libc == 'musl' }}
6146 run : |
6247 apk update
6348 apk add git ninja bash build-base nodejs linux-headers
6449
65- - uses : actions/checkout@v3
50+ - name : Prepare for Linux
51+ if : ${{ matrix.target == 'linux' && matrix.libc != 'musl' }}
52+ run : |
53+ sudo apt update
54+ sudo apt install ninja-build
55+
56+ - uses : actions/checkout@v4
6657 with :
6758 submodules : recursive
6859
69- - name : Build for others step-1
70- if : ${{ matrix.libc != 'musl ' }}
71- uses : actboy168/setup-luamake@master
60+ - name : Build for Windows
61+ if : ${{ matrix.target == 'windows ' }}
62+ run : .\make.bat ${{ matrix.platform }}
7263
73- - name : Build for others step-2
74- if : ${{ matrix.libc != 'musl' }}
75- run : luamake -platform ${{ matrix.platform }}
64+ - name : Build for Linux
65+ if : ${{ matrix.target == 'linux' }}
66+ run : |
67+ ./make.sh ${{ matrix.platform }}
68+
69+ - name : Build for macOS
70+ if : ${{ matrix.target == 'darwin' }}
71+ run : |
72+ brew install ninja
73+ ./make.sh ${{ matrix.platform }}
7674
77- - name : Build for musl
78- if : ${{ matrix.target == 'linux' && matrix.libc == 'musl' }}
79- run : ./make.sh
75+ - name : Build for x64 glibc
76+ if : ${{ matrix.platform == 'linux-x64' && matrix.libc != 'musl' }}
77+ run : |
78+ docker build -t ubuntu-18.04 .
79+ docker run --rm -v $(pwd):$(pwd) -w $(pwd) ubuntu-18.04 bash -c './make.sh'
8080
8181 - name : Setting up workflow variables
8282 id : vars
@@ -114,7 +114,7 @@ jobs:
114114 echo PKG_PATH="${PKG_STAGING}/${PKG_NAME}" >> $GITHUB_OUTPUT
115115 echo PKG_STAGING=${PKG_STAGING} >> $GITHUB_OUTPUT
116116
117- - uses : actions/upload-artifact@v3
117+ - uses : actions/upload-artifact@v4
118118 with :
119119 name : ${{ steps.vars.outputs.PKG_BASENAME }}
120120 path : |
0 commit comments