1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-27 12:29:33 +00:00

replace manual-only tests with scheduled test and manual dispatch

cache is used to prevent unnecessary rebuild if the previous build was successful
make steps now use SHELL=cmd to provide cmd.exe subshell
This commit is contained in:
bbbradsmith 2023-05-08 18:21:21 -04:00
parent ce6097ea7e
commit 07963abd52

View File

@ -1,8 +1,16 @@
name: Windows Test Manual name: Windows Test Scheduled
# Manually dispatched because it's much slower than the Linux test. # Scheduled or manually dispatched because it's slower than the Linux test.
on: on:
schedule:
- cron: '0 0 */1 * *'
# every 1 days
workflow_dispatch: workflow_dispatch:
# allow manual dispatch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# don't run more than once at a time
jobs: jobs:
build_windows: build_windows:
@ -10,34 +18,62 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
# This cache is used to remember the last build.
# If there are no changes and the last build was successful,
# the build and test steps will be omitted.
# If the last build failed, the full attempt will be repeated.
# Github Actions will retain the last build cache for up to 7 days.
- name: Create Cache
shell: bash
run: mkdir ~/.cache-sha
- name: Cache SHA
uses: actions/cache@v3
id: check-sha
with:
path: ~/.cache-sha
key: cache-sha-wintest-${{ github.sha }}
- name: Git Setup - name: Git Setup
if: steps.check-sha.outputs.cache-hit != 'true'
shell: bash shell: bash
run: git config --global core.autocrlf input run: git config --global core.autocrlf input
- name: Checkout source - name: Checkout source
if: steps.check-sha.outputs.cache-hit != 'true'
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Add msbuild to PATH - name: Add msbuild to PATH
if: steps.check-sha.outputs.cache-hit != 'true'
uses: microsoft/setup-msbuild@v1.1 uses: microsoft/setup-msbuild@v1.1
- name: Build app (MSVC debug) - name: Build app (MSVC debug)
if: steps.check-sha.outputs.cache-hit != 'true'
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
- name: Build app (MSVC release) - name: Build app (MSVC release)
if: steps.check-sha.outputs.cache-hit != 'true'
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release
- name: Build utils (MinGW) - name: Build utils (MinGW)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd shell: cmd
run: make -j2 util run: make -j2 util SHELL=cmd
- name: Build the platform libraries (make lib) - name: Build the platform libraries (make lib)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd shell: cmd
run: make -j2 lib QUIET=1 run: make lib QUIET=1 SHELL=cmd
# make -j2 lib fails with SHELL=cmd (not sure why)
- name: Run the regression tests (make test) - name: Run the regression tests (make test)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd shell: cmd
run: make test QUIET=1 run: make test QUIET=1 SHELL=cmd
- name: Test that the samples can be built (make samples) - name: Test that the samples can be built (make samples)
if: steps.check-sha.outputs.cache-hit != 'true'
shell: cmd shell: cmd
run: make -j2 samples run: make -j2 samples SHELL=cmd