diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index 1ad810382..55be5db1e 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -72,7 +72,3 @@ jobs: - name: Build app (release) run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release - - # The regression tests are currently too slow to run for this Windows build, - # but the "Windows Test Manual" workflow (windows-test-manual.yml) can by - # manually dispatched from the Actions menu to test as needed. diff --git a/.github/workflows/snapshot-on-push-master.yml b/.github/workflows/snapshot-on-push-master.yml index 6ba6b63ed..2aedb0e25 100644 --- a/.github/workflows/snapshot-on-push-master.yml +++ b/.github/workflows/snapshot-on-push-master.yml @@ -29,10 +29,6 @@ jobs: - name: Build app (release) run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release - # The regression tests are currently too slow to run for this Windows build, - # but the "Windows Test Manual" workflow (windows-test-manual.yml) can by - # manually dispatched from the Actions menu to test as needed. - build_linux: name: Build, Test, and Snapshot (Linux) if: github.repository == 'cc65/cc65' diff --git a/.github/workflows/windows-test-manual.yml b/.github/workflows/windows-test-manual.yml deleted file mode 100644 index 854327726..000000000 --- a/.github/workflows/windows-test-manual.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Windows Test Manual -# Manually dispatched because it's much slower than the Linux test. - -on: - workflow_dispatch: - -jobs: - build_windows: - name: Build, Test (Windows MSVC) - runs-on: windows-latest - - steps: - - name: Git Setup - shell: bash - run: git config --global core.autocrlf input - - - name: Checkout source - uses: actions/checkout@v3 - - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.1 - - - name: Build app (MSVC debug) - run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug - - - name: Build app (MSVC release) - run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release - - - name: Build utils (MinGW) - shell: cmd - run: make -j2 util - - - name: Build the platform libraries (make lib) - shell: cmd - run: make -j2 lib QUIET=1 - - - name: Run the regression tests (make test) - shell: cmd - run: make test QUIET=1 - - - name: Test that the samples can be built (make samples) - shell: cmd - run: make -j2 samples diff --git a/.github/workflows/windows-test-scheduled.yml b/.github/workflows/windows-test-scheduled.yml new file mode 100644 index 000000000..451b37f79 --- /dev/null +++ b/.github/workflows/windows-test-scheduled.yml @@ -0,0 +1,78 @@ +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: + name: Build, Test (Windows MSVC) + 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 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 SHELL=cmd + + - name: Run the regression tests (make test) + if: steps.check-sha.outputs.cache-hit != 'true' + shell: cmd + 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 SHELL=cmd diff --git a/libsrc/Makefile b/libsrc/Makefile index 732fa1d0e..0873d019f 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -122,9 +122,13 @@ endef # ZIP_recipe zip: $(foreach dir,$(OUTPUTDIRS),$(ZIP_recipe)) -$(TARGETS): +$(TARGETS): | ../lib @$(MAKE) --no-print-directory $@ +# ../lib must be created globally before doing lib targets in parallel +../lib: + @$(call MKDIR,$@) + else # TARGET CA65FLAGS = @@ -293,10 +297,12 @@ $(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../libwrk/$(TARGET) ../lib @echo $(TARGET) - $(