Skip to content

Commit

Permalink
cicd: wip test cicd using wine-msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazrius committed Nov 8, 2024
1 parent f2043f2 commit b3a2511
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/actions/msvc-wine/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Download msvc-wine and cache it"
author: laz
description: "Download msvc-wine and cache it, or restore it from the cache"
runs:
using: composite
steps:
- name: "Install package dependencies"
run: |
sudo dpkg --add-architecture i386 && sudo apt-get update
sudo apt-get install wine64 wine32 python3 msitools ca-certificates cmake ninja-build winbind meson
wine64 wineboot
curl -s -L -O https://github.com/madewokherd/wine-mono/releases/download/wine-mono-5.1.1/wine-mono-5.1.1-x86.msi
wine64 msiexec /i wine-mono-5.1.1-x86.msi
shell: bash

- name: "Restore msvc-wine cache"
id: dependency-msvc-wine
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/msvc
key: dependency-msvc-wine

- name: "Clone msvc-wine"
if: steps.dependency-msvc-wine.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: 'mstorsjo/msvc-wine'
path: 'msvc-wine'

- name: "Run msvc-wine setup"
if: steps.dependency-msvc-wine.outputs.cache-hit != 'true'
run: |
${{ github.workspace }}/msvc-wine/vsdownload.py --accept-license --dest ${{ github.workspace }}/msvc
${{ github.workspace }}/msvc-wine/install.sh ${{ github.workspace }}/msvc
shell: bash

- name: "Setup x86 MSVC environment"
run:
source ${{ github.workspace }}/msvc/bin/x86/msvcenv.sh
echo $INCLUDE
shell: bash
39 changes: 39 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Nightly Release
on:
# This can be used to automatically publish nightlies at UTC nighttime
schedule:
- cron: '0 3 * * *' # run at 3 AM UTC
# This can be used to allow manually triggering nightlies from the web interface
workflow_dispatch:

jobs:
date-check:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v4
- name: print latest_commit
run: echo ${{ github.sha }}

- id: should_run
continue-on-error: true
name: check latest commit is less than a day
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"

build:
needs: date-check
if: ${{ needs.date-check.outputs.should_run != 'false' }}
runs-on: ubuntu-latest
steps:
# Clone this repo
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
# Download and setup msvc-wine
- name: "Setup msvc-wine"
id: "msvc"
uses: "./.github/actions/msvc-wine"

0 comments on commit b3a2511

Please sign in to comment.