Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #70
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: yode | |
on: push | |
jobs: | |
power_on_azure_vm: | |
name: Power On Azure VM | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- name: Az CLI login | |
uses: azure/login@v1 | |
with: | |
# Creds created following: | |
# https://blog.beachside.dev/entry/2021/08/27/183000 | |
creds: '${{ secrets.AZURE_CREDENTIALS_GITHUB_ACTIONS}}' | |
- name: Power ON | |
run: az vm start --resource-group yue --name yode-ci --no-wait | |
build: | |
runs-on: ${{ matrix.os }} | |
continue-on-error: false | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, macos-11, [self-hosted, Windows]] | |
arch: [x64] | |
include: | |
- os: macos-11 | |
arch: arm64 | |
- os: [self-hosted, Windows] | |
arch: ia32 | |
steps: | |
- name: Install Linux Dependencies | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt update | |
sudo apt-get install -y libgtk-3-dev | |
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: CCache | |
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') | |
uses: hendrikmuhs/[email protected] | |
with: | |
max-size: ${{ matrix.arch == 'arm64' && '3G' || '2G' }} | |
key: ccache-${{ matrix.os }}-${{ matrix.arch }} | |
- name: Build Posix | |
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') | |
env: | |
CCACHE_SLOPPINESS: time_macros | |
shell: bash | |
run: | | |
set -e | |
if [ "$(uname)" == "Darwin" ]; then | |
WRAPPER=/usr/local/bin/ccache | |
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | |
WRAPPER=/usr/bin/ccache | |
fi | |
node build.js --cc-wrapper=$WRAPPER ${{ matrix.arch }} | |
- name: Build Windows | |
if: join(matrix.os, '-') == 'self-hosted-Windows' | |
run: | | |
node build.js ${{ matrix.arch }} | |
- name: Test | |
if: matrix.arch == 'x64' || matrix.arch == 'ia32' | |
env: | |
DISPLAY: ':99.0' | |
run: out/Release/yode test/main.js | |
- name: Upload Binary Files | |
uses: actions/upload-artifact@v3 | |
with: | |
path: out/Release/*.zip | |
retention-days: 1 | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Files | |
uses: actions/[email protected] | |
- name: Release | |
uses: softprops/[email protected] | |
with: | |
draft: true | |
name: Yode ${{ github.ref_name }} | |
body: '## Changelog' | |
files: artifact/*.zip |