1
0
mirror of https://github.com/cc65/cc65.git synced 2025-08-08 22:25:28 +00:00

Changed a big script into separate named steps.

It makes the job log easier to navigate.

Also, Pull Requests don't need a Zip file.
This commit is contained in:
Greg King
2021-12-12 12:27:55 -05:00
parent b35a9d97a6
commit 2feadf865c
2 changed files with 52 additions and 33 deletions

View File

@@ -1,6 +1,6 @@
name: Build Pull Request name: Build Pull Request
on: [pull_request] on: [pull_request]
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
@@ -8,11 +8,11 @@ jobs:
build_linux: build_linux:
name: Build and Test (Linux) name: Build and Test (Linux)
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- shell: bash - shell: bash
run: git config --global core.autocrlf input run: git config --global core.autocrlf input
- name: Checkout Source - name: Checkout Source
uses: actions/checkout@v2 uses: actions/checkout@v2
@@ -21,28 +21,35 @@ jobs:
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass
- name: Build - name: Build the tools.
id: build
shell: bash shell: bash
run: make -j2 bin USER_CFLAGS=-Werror
- name: Build the platform libraries.
shell: bash
run: make -j2 lib QUIET=1
- name: Run the regression tests.
shell: bash
run: make test QUIET=1
- name: Test that the samples can be built.
shell: bash
run: make -j2 samples
- name: Build the document files.
shell: bash
run: make -j2 doc
- name: Build 32-bit Windows versions of the tools.
run: | run: |
make -j2 bin USER_CFLAGS=-Werror
make -j2 lib QUIET=1
make test QUIET=1
make -j2 samples
make -C src clean make -C src clean
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32- make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
make -C samples clean
make -j2 doc zip
build_windows: build_windows:
name: Build (Windows) name: Build (Windows)
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- shell: bash - shell: bash
run: git config --global core.autocrlf input run: git config --global core.autocrlf input
- name: Checkout Source - name: Checkout Source
uses: actions/checkout@v2 uses: actions/checkout@v2
@@ -51,6 +58,6 @@ jobs:
- name: Build app (debug) - name: Build app (debug)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
- name: Build app (release) - name: Build app (release)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release

View File

@@ -1,9 +1,9 @@
name: Snapshot Build name: Snapshot Build
on: on:
push: push:
branches: branches:
master master
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
@@ -11,11 +11,11 @@ jobs:
build_windows: build_windows:
name: Build (Windows) name: Build (Windows)
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- shell: bash - shell: bash
run: git config --global core.autocrlf input run: git config --global core.autocrlf input
- name: Checkout Source - name: Checkout Source
uses: actions/checkout@v2 uses: actions/checkout@v2
@@ -24,7 +24,7 @@ jobs:
- name: Build app (debug) - name: Build app (debug)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
- name: Build app (release) - name: Build app (release)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release
@@ -32,11 +32,11 @@ jobs:
name: Build, Test and Snaphot (Linux) name: Build, Test and Snaphot (Linux)
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build_windows needs: build_windows
steps: steps:
- shell: bash - shell: bash
run: git config --global core.autocrlf input run: git config --global core.autocrlf input
- name: Checkout Source - name: Checkout Source
uses: actions/checkout@v2 uses: actions/checkout@v2
@@ -45,25 +45,37 @@ jobs:
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass
- name: Build - name: Build the tools.
id: build
shell: bash shell: bash
run: make -j2 bin USER_CFLAGS=-Werror
- name: Build the platform libraries.
shell: bash
run: make -j2 lib QUIET=1
- name: Run the regression tests.
shell: bash
run: make test QUIET=1
- name: Test that the samples can be built.
shell: bash
run: make -j2 samples
- name: Remove the output from the samples tests.
shell: bash
run: make -C samples clean
- name: Build the document files.
shell: bash
run: make -j2 doc
- name: Build and package 32-bit Windows versions of the tools.
run: | run: |
make -j2 bin USER_CFLAGS=-Werror
make -j2 lib QUIET=1
make test QUIET=1
make -j2 samples
make -C src clean make -C src clean
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32- make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
make -C samples clean make zip
make -j2 doc zip mv cc65.zip cc65-win32.zip
- name: Upload Snapshot Zip - name: Upload Snapshot Zip
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: cc65-snapshot-win32.zip name: cc65-snapshot-win32.zip
path: cc65.zip path: cc65-win32.zip
# TODO: Update docs at https://github.com/cc65/doc # TODO: Update docs at https://github.com/cc65/doc
# TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io # TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io