From 6dbcadf3c812ed1bcfb5f95fea90aa0d4198b095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Bac=C5=82awski?= Date: Mon, 18 Apr 2022 08:51:55 +0200 Subject: [PATCH 1/5] Replace CircleCI with GitHub Actions --- .circleci/DATESTAMP | 1 - .circleci/config.yml | 30 ------------------------------ .github/workflows/workflow.yml | 26 ++++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 31 deletions(-) delete mode 100644 .circleci/DATESTAMP delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/workflow.yml diff --git a/.circleci/DATESTAMP b/.circleci/DATESTAMP deleted file mode 100644 index bc96198..0000000 --- a/.circleci/DATESTAMP +++ /dev/null @@ -1 +0,0 @@ -20200215-2 diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 1cb8f03..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: 2 - -defaults: &defaults - working_directory: ~/demoscene-toolchain - docker: - - image: cahirwpz/demoscene-toolchain:latest - -jobs: - m68k: - <<: *defaults - steps: - - checkout - - restore_cache: - keys: - - m68k-cache-{{ .Branch }}-{{ checksum ".circleci/DATESTAMP" }} - - run: './toolchain-m68k --quiet download' - - save_cache: - key: m68k-cache-{{ .Branch }}-{{ checksum ".circleci/DATESTAMP" }} - paths: - - .build-m68k - - run: './toolchain-m68k --quiet build --prefix=/usr/local' - - run: 'tar cvzf /demoscene-toolchain.tar.gz /usr/local' - - store_artifacts: - path: /demoscene-toolchain.tar.gz - -workflows: - version: 2 - demoscene-toolchain: - jobs: - - m68k diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..c5c3672 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,26 @@ +name: Demoscene Toolchain + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + container: cahirwpz/demoscene-toolchain:latest + + steps: + - uses: actions/checkout@v2 + + - name: Download toolchain + run: ./toolchain-m68k --quiet download + + - name: Build toolchain + run: ./toolchain-m68k --quiet build --prefix=/usr/local + + - name: Archive toolchain + run: tar cvzf demoscene-toolchain.tar.gz /usr/local + + - name: Upload toolchain + uses: actions/upload-artifact@v2 + with: + name: demoscene-toolchain + path: demoscene-toolchain.tar.gz From ce6242e564ca64307af6de15ee1b646759f72a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Bac=C5=82awski?= Date: Mon, 18 Apr 2022 09:14:49 +0200 Subject: [PATCH 2/5] Add caching action. --- .github/workflows/workflow.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index c5c3672..76885db 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -13,6 +13,23 @@ jobs: - name: Download toolchain run: ./toolchain-m68k --quiet download + - name: Cache external archives + uses: actions/cache@v2 + env: + cache-name: cache-externals + with: + path: | + - .build-m68k/archives + - submodules/binutils-gdb + - submodules/fd2pragma + - submodules/fd2sfd + - submodules/fs-uae + - submodules/gcc-2.95.3 + - submodules/python-amidev + - submodules/python-lhafile + - submodules/sfdc + key: 20220418-1 + - name: Build toolchain run: ./toolchain-m68k --quiet build --prefix=/usr/local From 8121809d07c7ec288cc1395d7ab74bebf290f51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Bac=C5=82awski?= Date: Mon, 18 Apr 2022 10:01:11 +0200 Subject: [PATCH 3/5] Test submodules and cache. --- .github/workflows/workflow.yml | 38 +++++++++++++--------------------- 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 76885db..a35ac67 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -8,36 +8,26 @@ jobs: container: cahirwpz/demoscene-toolchain:latest steps: - - uses: actions/checkout@v2 - - - name: Download toolchain - run: ./toolchain-m68k --quiet download + - uses: actions/checkout@v3 + with: + submodules: true - - name: Cache external archives - uses: actions/cache@v2 - env: - cache-name: cache-externals + - name: Cache archives + id: cache-archives + uses: actions/cache@v3 with: - path: | - - .build-m68k/archives - - submodules/binutils-gdb - - submodules/fd2pragma - - submodules/fd2sfd - - submodules/fs-uae - - submodules/gcc-2.95.3 - - submodules/python-amidev - - submodules/python-lhafile - - submodules/sfdc - key: 20220418-1 + path: .build-m68k/archives + key: cache-archives-${{ hashFiles('.build-m68k/archives/**') }} + + - name: Download archives + if: steps.cache-archives.outputs.cache-hit != 'true' + run: ./toolchain-m68k --quiet download - name: Build toolchain run: ./toolchain-m68k --quiet build --prefix=/usr/local - - name: Archive toolchain - run: tar cvzf demoscene-toolchain.tar.gz /usr/local - - name: Upload toolchain - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: demoscene-toolchain - path: demoscene-toolchain.tar.gz + path: /usr/local From 65d59c460c88c6a2514341366f5f14229dd86025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Bac=C5=82awski?= Date: Mon, 18 Apr 2022 10:35:43 +0200 Subject: [PATCH 4/5] Caching does not work as intended - remove it. --- .github/workflows/workflow.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index a35ac67..f96249c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -12,22 +12,17 @@ jobs: with: submodules: true - - name: Cache archives - id: cache-archives - uses: actions/cache@v3 - with: - path: .build-m68k/archives - key: cache-archives-${{ hashFiles('.build-m68k/archives/**') }} - - name: Download archives - if: steps.cache-archives.outputs.cache-hit != 'true' run: ./toolchain-m68k --quiet download - name: Build toolchain run: ./toolchain-m68k --quiet build --prefix=/usr/local + - name: Archive toolchain + run: tar cf demoscene-toolchain.tar /usr/local + - name: Upload toolchain uses: actions/upload-artifact@v3 with: name: demoscene-toolchain - path: /usr/local + path: demoscene-toolchain.tar From 05bc4320b5dec2be15c017499735e1745061f0c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Bac=C5=82awski?= Date: Mon, 18 Apr 2022 10:49:07 +0200 Subject: [PATCH 5/5] Add compression for the artifact. --- .github/workflows/workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index f96249c..00b34cc 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -19,10 +19,10 @@ jobs: run: ./toolchain-m68k --quiet build --prefix=/usr/local - name: Archive toolchain - run: tar cf demoscene-toolchain.tar /usr/local + run: tar czf demoscene-toolchain.tar.gz /usr/local - name: Upload toolchain uses: actions/upload-artifact@v3 with: name: demoscene-toolchain - path: demoscene-toolchain.tar + path: demoscene-toolchain.tar.gz