2021-12-12 17:27:55 +00:00
|
|
|
name: Snapshot Build
|
2021-12-11 02:53:53 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
master
|
2021-12-12 17:27:55 +00:00
|
|
|
concurrency:
|
2021-12-11 02:53:53 +00:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_windows:
|
|
|
|
name: Build (Windows)
|
2022-02-17 05:30:31 +00:00
|
|
|
if: github.repository == 'cc65/cc65'
|
2021-12-11 02:53:53 +00:00
|
|
|
runs-on: windows-latest
|
2021-12-12 17:27:55 +00:00
|
|
|
|
2021-12-11 02:53:53 +00:00
|
|
|
steps:
|
|
|
|
- shell: bash
|
|
|
|
run: git config --global core.autocrlf input
|
2021-12-12 17:27:55 +00:00
|
|
|
|
2021-12-11 02:53:53 +00:00
|
|
|
- name: Checkout Source
|
2022-11-18 18:00:35 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-12-11 02:53:53 +00:00
|
|
|
|
|
|
|
- name: Add msbuild to PATH
|
|
|
|
uses: microsoft/setup-msbuild@v1.1
|
|
|
|
|
|
|
|
- name: Build app (debug)
|
|
|
|
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
|
2021-12-12 17:27:55 +00:00
|
|
|
|
2021-12-11 02:53:53 +00:00
|
|
|
- name: Build app (release)
|
|
|
|
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release
|
|
|
|
|
|
|
|
build_linux:
|
2022-02-06 09:21:53 +00:00
|
|
|
name: Build, Test, and Snapshot (Linux)
|
2022-02-17 05:30:31 +00:00
|
|
|
if: github.repository == 'cc65/cc65'
|
2021-12-11 02:53:53 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-12-12 17:27:55 +00:00
|
|
|
|
2021-12-11 02:53:53 +00:00
|
|
|
steps:
|
|
|
|
- name: Install Dependencies
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2021-12-12 18:42:25 +00:00
|
|
|
sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-x86-64 gcc-mingw-w64-i686
|
2021-12-12 17:27:55 +00:00
|
|
|
|
2021-12-13 04:54:17 +00:00
|
|
|
- shell: bash
|
|
|
|
run: git config --global core.autocrlf input
|
|
|
|
- name: Checkout Source
|
2022-11-18 17:39:58 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-12-13 04:54:17 +00:00
|
|
|
|
2022-04-16 16:32:49 +00:00
|
|
|
- name: Do some simple style checks
|
|
|
|
shell: bash
|
2022-05-17 12:30:41 +00:00
|
|
|
run: make -j2 checkstyle
|
2022-11-18 17:19:31 +00:00
|
|
|
- name: Build the tools.
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
make -j2 bin USER_CFLAGS=-Werror
|
|
|
|
make -j2 util
|
|
|
|
- name: Build the platform libraries.
|
|
|
|
shell: bash
|
|
|
|
run: make -j2 lib QUIET=1
|
2023-05-04 19:13:37 +00:00
|
|
|
- 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
|
2022-11-18 17:19:31 +00:00
|
|
|
- name: Remove programs in util directory
|
|
|
|
shell: bash
|
|
|
|
run: make -C util clean
|
|
|
|
- name: Build the document files.
|
|
|
|
shell: bash
|
|
|
|
run: make -j2 doc
|
2021-12-12 18:42:25 +00:00
|
|
|
- name: Build and package 64-bit Windows versions of the tools.
|
|
|
|
run: |
|
|
|
|
make -C src clean
|
2022-11-18 16:39:35 +00:00
|
|
|
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
|
2021-12-12 18:42:25 +00:00
|
|
|
make zip
|
2022-02-06 17:20:09 +00:00
|
|
|
mv cc65.zip cc65-snapshot-win64.zip
|
2021-12-12 17:27:55 +00:00
|
|
|
- name: Build and package 32-bit Windows versions of the tools.
|
2021-12-11 02:53:53 +00:00
|
|
|
run: |
|
|
|
|
make -C src clean
|
2022-11-18 16:39:35 +00:00
|
|
|
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
|
2021-12-12 17:27:55 +00:00
|
|
|
make zip
|
2022-02-06 17:20:09 +00:00
|
|
|
mv cc65.zip cc65-snapshot-win32.zip
|
2021-12-12 17:27:55 +00:00
|
|
|
|
2021-12-12 18:42:25 +00:00
|
|
|
- name: Upload a 32-bit Snapshot Zip
|
2023-05-04 19:07:23 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-12-11 02:53:53 +00:00
|
|
|
with:
|
2023-05-05 15:00:06 +00:00
|
|
|
name: cc65-snapshot-win32
|
2022-02-06 17:20:09 +00:00
|
|
|
path: cc65-snapshot-win32.zip
|
2021-12-12 18:42:25 +00:00
|
|
|
- name: Upload a 64-bit Snapshot Zip
|
2023-05-04 19:07:23 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-12-12 18:42:25 +00:00
|
|
|
with:
|
2023-05-05 15:00:06 +00:00
|
|
|
name: cc65-snapshot-win64
|
2022-02-06 17:20:09 +00:00
|
|
|
path: cc65-snapshot-win64.zip
|
2021-12-11 02:53:53 +00:00
|
|
|
|
2022-06-17 22:24:42 +00:00
|
|
|
- name: Get the online documents repo.
|
2022-11-18 18:00:35 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-06-18 01:22:43 +00:00
|
|
|
with:
|
|
|
|
repository: cc65/doc
|
2023-05-04 18:03:27 +00:00
|
|
|
# this token will expire, if it does, generate a new one as decribed in https://github.com/cc65/cc65/issues/2065
|
2023-05-04 19:13:37 +00:00
|
|
|
# - apparently only a "classic" token works here
|
|
|
|
# - the token must exist in the cc65/cc65 repo
|
2023-05-04 18:03:27 +00:00
|
|
|
token: ${{ secrets.DOC_PAT }} # use secret token instead of default
|
2022-06-18 01:22:43 +00:00
|
|
|
path: doc.git
|
2022-06-17 06:30:52 +00:00
|
|
|
- name: Update the online documents.
|
|
|
|
run: |
|
2022-06-17 16:58:56 +00:00
|
|
|
cd doc.git
|
2022-06-17 05:44:40 +00:00
|
|
|
rm *.*
|
2022-06-17 16:58:56 +00:00
|
|
|
cp ../html/*.* .
|
2022-06-17 05:44:40 +00:00
|
|
|
git config user.name "cc65-github"
|
|
|
|
git config user.email "cc65.nomail@github.com"
|
|
|
|
git config push.default simple
|
|
|
|
git add -A
|
2023-05-04 20:09:22 +00:00
|
|
|
# prevent failure when there is nothing to commit
|
2023-05-05 16:02:50 +00:00
|
|
|
git diff-index --quiet HEAD || git commit -m "Updated from https://github.com/cc65/cc65/commit/${GITHUB_SHA}"
|
|
|
|
git push
|
2023-05-05 14:56:43 +00:00
|
|
|
- name: Package offline documents.
|
|
|
|
run: 7z a cc65-snapshot-docs.zip ./html/*.*
|
|
|
|
- name: Upload a Documents Snapshot Zip
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-05-05 15:00:06 +00:00
|
|
|
name: cc65-snapshot-docs
|
2023-05-05 14:56:43 +00:00
|
|
|
path: cc65-snapshot-docs.zip
|
2022-06-17 05:44:40 +00:00
|
|
|
|
2022-02-06 17:20:09 +00:00
|
|
|
# enter secrets under "repository secrets"
|
2023-05-05 14:56:43 +00:00
|
|
|
- name: Upload 32-bit Windows snapshot to sourceforge
|
2022-02-06 17:20:09 +00:00
|
|
|
uses: nogsantos/scp-deploy@master
|
|
|
|
with:
|
|
|
|
src: cc65-snapshot-win32.zip
|
|
|
|
host: ${{ secrets.SSH_HOST }}
|
|
|
|
remote: ${{ secrets.SSH_DIR }}
|
|
|
|
port: ${{ secrets.SSH_PORT }}
|
|
|
|
user: ${{ secrets.SSH_USER }}
|
|
|
|
key: ${{ secrets.SSH_KEY }}
|
2023-11-07 02:36:58 +00:00
|
|
|
- name: Upload 64-bit Windows snapshot to sourceforge
|
|
|
|
uses: nogsantos/scp-deploy@master
|
|
|
|
with:
|
|
|
|
src: cc65-snapshot-win64.zip
|
|
|
|
host: ${{ secrets.SSH_HOST }}
|
|
|
|
remote: ${{ secrets.SSH_DIR }}
|
|
|
|
port: ${{ secrets.SSH_PORT }}
|
|
|
|
user: ${{ secrets.SSH_USER }}
|
|
|
|
key: ${{ secrets.SSH_KEY }}
|
2023-05-05 14:56:43 +00:00
|
|
|
- name: Upload documents snapshot to sourceforge
|
|
|
|
uses: nogsantos/scp-deploy@master
|
|
|
|
with:
|
|
|
|
src: cc65-snapshot-docs.zip
|
|
|
|
host: ${{ secrets.SSH_HOST }}
|
|
|
|
remote: ${{ secrets.SSH_DIR }}
|
|
|
|
port: ${{ secrets.SSH_PORT }}
|
|
|
|
user: ${{ secrets.SSH_USER }}
|
|
|
|
key: ${{ secrets.SSH_KEY }}
|
2022-06-17 05:44:40 +00:00
|
|
|
|
2021-12-11 02:53:53 +00:00
|
|
|
# TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io
|