feat: test for spec

This commit is contained in:
msojocs 2023-09-23 13:13:44 +08:00
parent 012e2bdb9f
commit a972b98f16
2 changed files with 56 additions and 3 deletions

View File

@ -77,13 +77,66 @@ jobs:
uses: actions/upload-artifact@v2.3.1
with:
# Artifact name
name: wechat-devtools-${{ matrix.ARCH }}.build
name: wx-compiler-${{ matrix.ARCH }}.build
path: tmp/build
test:
name: Test for spec
needs:
- build
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [16.x]
ARCH: ['x86_64']
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Inspect directory after downloading artifacts
run: ls -alFR
- name: Prepare
run: |
set -x -u -o pipefail
source /etc/os-release
# Get rid of packages installed from ppa:ondrej/php so that we will be able to install wine32:i386 without conflicts
# (see issue https://github.com/actions/virtual-environments/issues/4589)
# In detail we:
# 1. Remove all packages that ppa:ondrej/php has but plain Ubuntu doesn't, e.g. everything PHP
# 2. Revert (remaining) packages that ppa:ondrej/php and plain Ubuntu share, back to the plain Ubuntu version
# 3. Assert that no packages from ppa:ondrej/php are left installed
dpkg -l | grep '^ii' | grep -F deb.sury.org | awk '{print $2}' | grep '^php' \
| xargs -r -t sudo apt-get remove --yes libpcre2-posix3 libzip4
dpkg -l | grep '^ii' | grep -F deb.sury.org | awk '{print $2}' | sed "s,\$,/${UBUNTU_CODENAME}," \
| xargs -r -t sudo apt-get install --yes --no-install-recommends --allow-downgrades -V
! dpkg -l | grep '^ii' | grep -F deb.sury.org
sudo apt update
sudo apt install -y wine64
sudo dpkg --add-architecture i386
dpkg --print-foreign-architectures
sudo apt update
sudo apt install libwine
echo "install wine32..."
sudo apt install wine32
corepack enable
ls -l
mkdir build
cp **build/{wcc, wcsc} build
pnpm install
- name: Test
run: |
pnpm run test
upload:
name: Create release and upload artifacts
needs:
- build
- test
runs-on: ubuntu-latest
steps:
- name: Download artifacts

View File

@ -1,7 +1,7 @@
#!/bin/bash
gcc --version
g++ --version
cmake --verion
# cmake --verion
cd /workspace
rm -rf ./build
mkdir build