diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 57311e81..c0a2cea5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,16 +9,49 @@ on: jobs: build: - runs-on: ${{ matrix.os }} - strategy: fail-fast: false matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - + include: + - os: windows-latest + platform: win32 + arch: x64 + npm_config_arch: x64 + - os: windows-latest + platform: win32 + arch: arm64 + npm_config_arch: arm + - os: ubuntu-latest + platform: linux + arch: x64 + npm_config_arch: x64 + - os: ubuntu-latest + platform: linux + arch: arm64 + npm_config_arch: arm64 + - os: ubuntu-latest + platform: linux + arch: armhf + npm_config_arch: arm + - os: ubuntu-latest + platform: alpine + arch: x64 + npm_config_arch: x64 + - os: macos-latest + platform: darwin + arch: x64 + npm_config_arch: x64 + - os: macos-latest + platform: darwin + arch: arm64 + npm_config_arch: arm64 + runs-on: ${{ matrix.os }} steps: - name: Clone repository uses: actions/checkout@v4 + + - shell: pwsh + run: echo "TARGET=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV - name: Setup Node uses: actions/setup-node@v4 @@ -32,11 +65,13 @@ jobs: cache-name: cache-node-modules with: path: "**/node_modules" - key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package.json', '**/package-lock.json') }} + key: ${{ runner.os }}-${{ matrix.npm_config_arch }}-node-modules-${{ hashFiles('**/package.json', '**/package-lock.json') }} - name: Install dependencies if: steps.cache-node-modules.outputs.cache-hit != 'true' run: npm ci + env: + npm_config_arch: ${{ matrix.npm_config_arch }} - name: Lint run: npm run lint @@ -52,8 +87,24 @@ jobs: - name: Build project run: npm run build + - name: Setup X11 + if: runner.os == 'ubuntu-latest' + shell: bash + run: | + sudo apt update + sudo apt-get install -y \ + libglx-mesa0 \ + libgl1 \ + xvfb \ + x11-xserver-utils \ + mesa-utils \ + x11-utils + echo "DISPLAY=:99.0" >> $GITHUB_ENV + Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + sleep 3 + - name: Run server tests - run: npm run test:codecov + run: npm run test # TODO: fix codecov issue - name: Run protocol tests run: npm run test:protocol @@ -78,3 +129,8 @@ jobs: SOLIDITY_GOOGLE_TRACKING_ID: "dummy-value" SOLIDITY_SENTRY_DSN: "dummy-value" run: npm run package + - name: upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.platform }}-${{ matrix.arch }} + path: "client/*.vsix" diff --git a/client/package.json b/client/package.json index 5a341eb7..de945666 100644 --- a/client/package.json +++ b/client/package.json @@ -52,7 +52,7 @@ "prettier": "prettier *.json \"src/**/*.{ts,js,md,json,yml}\"", "clean": "rimraf out tmp tsconfig.tsbuildinfo", "prepackage": "npm run clean && node scripts/bundle.js", - "package": "cd ./tmp && vsce package --no-dependencies --no-yarn -o ..", + "package": "cross-env-shell \"cd ./tmp && vsce package --no-dependencies --no-yarn --target $TARGET -o ..\"", "postpackage": "rimraf ./tmp" }, "devDependencies": { diff --git a/package-lock.json b/package-lock.json index 35611627..a920cd74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ }, "client": { "name": "hardhat-solidity", - "version": "0.8.5", + "version": "0.8.6", "license": "MIT", "dependencies": { "@nomicfoundation/solidity-language-server": "0.6.16", @@ -142,10 +142,10 @@ }, "coc": { "name": "@nomicfoundation/coc-solidity", - "version": "0.8.5", + "version": "0.8.6", "license": "MIT", "dependencies": { - "@nomicfoundation/solidity-language-server": "0.8.5" + "@nomicfoundation/solidity-language-server": "0.8.6" }, "devDependencies": { "coc.nvim": "^0.0.80", @@ -11645,7 +11645,7 @@ }, "server": { "name": "@nomicfoundation/solidity-language-server", - "version": "0.8.5", + "version": "0.8.6", "license": "MIT", "dependencies": { "@nomicfoundation/slang": "0.16.0", @@ -13986,7 +13986,7 @@ "@nomicfoundation/coc-solidity": { "version": "file:coc", "requires": { - "@nomicfoundation/solidity-language-server": "0.8.5", + "@nomicfoundation/solidity-language-server": "0.8.6", "coc.nvim": "^0.0.80", "esbuild": "^0.16.0", "eslint": "^7.23.0"