mirror of
https://github.com/cc65/cc65.git
synced 2025-01-03 16:33:19 +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:
parent
ce6097ea7e
commit
07963abd52
48
.github/workflows/windows-test-scheduled.yml
vendored
48
.github/workflows/windows-test-scheduled.yml
vendored
@ -1,8 +1,16 @@
|
||||
name: Windows Test Manual
|
||||
# Manually dispatched because it's much slower than the Linux test.
|
||||
name: Windows Test Scheduled
|
||||
# Scheduled or manually dispatched because it's slower than the Linux test.
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 */1 * *'
|
||||
# every 1 days
|
||||
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:
|
||||
build_windows:
|
||||
@ -10,34 +18,62 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
|
||||
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
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: git config --global core.autocrlf input
|
||||
|
||||
- name: Checkout source
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
uses: microsoft/setup-msbuild@v1.1
|
||||
|
||||
- name: Build app (MSVC debug)
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
|
||||
|
||||
- name: Build app (MSVC release)
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release
|
||||
|
||||
- name: Build utils (MinGW)
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
shell: cmd
|
||||
run: make -j2 util
|
||||
run: make -j2 util SHELL=cmd
|
||||
|
||||
- name: Build the platform libraries (make lib)
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
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)
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
shell: cmd
|
||||
run: make test QUIET=1
|
||||
run: make test QUIET=1 SHELL=cmd
|
||||
|
||||
- name: Test that the samples can be built (make samples)
|
||||
if: steps.check-sha.outputs.cache-hit != 'true'
|
||||
shell: cmd
|
||||
run: make -j2 samples
|
||||
run: make -j2 samples SHELL=cmd
|
||||
|
Loading…
Reference in New Issue
Block a user