autobuild safetyhook by xmake-repo/ci #7773
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows | |
on: | |
push: | |
branches: | |
- build | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2019,windows-2022] | |
kind: [static, shared] | |
arch: [x64, x86] | |
vs_runtime: [MT, MD] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: xmake-io/github-action-setup-xmake@v1 | |
with: | |
xmake-version: branch@dev | |
- name: Prepare | |
run: | | |
iwr -useb get.scoop.sh -outfile 'install.ps1' | |
.\install.ps1 -RunAsAdmin | |
scoop install gh | |
gh --version | |
Write-Output ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token | |
- name: Configure Pagefile | |
uses: al-cheb/configure-pagefile-action@v1.2 | |
with: | |
minimum-size: 8GB | |
maximum-size: 32GB | |
disk-root: "D:" | |
- name: Build artifacts | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
xmake l scripts/build.lua -a ${{ matrix.arch }} -k ${{ matrix.kind }} -f "vs_runtime='${{ matrix.vs_runtime }}'" | |
update: | |
needs: build | |
if: always() | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: xmake-io/github-action-setup-xmake@v1 | |
with: | |
xmake-version: branch@dev | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_KEY }} | |
name: id_rsa # optional | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
- name: Install SSH key (OSC) | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_KEY_OSC }} | |
name: id_ed25519 # optional | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
- name: Prepare | |
run: | | |
iwr -useb get.scoop.sh -outfile 'install.ps1' | |
.\install.ps1 -RunAsAdmin | |
scoop install gh | |
gh --version | |
Write-Output ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token | |
git config --global user.email "waruqi@gmail.com" | |
git config --global user.name "ruki" | |
- name: Update manifest | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
xmake l -vD scripts/update.lua |