From 544b39a8a5ea156f934c0cc41d774fe047409063 Mon Sep 17 00:00:00 2001 From: Tristan Koh Date: Thu, 10 Jun 2021 12:00:57 +0800 Subject: changed build wheels repo link from master to main --- .github/workflows/build-python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml index 6326821dc..67cbba6dd 100644 --- a/.github/workflows/build-python-package.yml +++ b/.github/workflows/build-python-package.yml @@ -25,7 +25,7 @@ jobs: - name: Install cibuildwheel run: | - python -m pip install git+https://github.com/joerick/cibuildwheel.git@master + python -m pip install git+https://github.com/joerick/cibuildwheel.git@main - name: Install build tools for OSX if: startsWith(matrix.os, 'macos') -- cgit v1.2.3 From 889be1ab8ed6a71feea211ff8ce1ca0ed72d4d0a Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Thu, 17 Jun 2021 16:42:04 +0800 Subject: Enable tests in github actions --- .github/workflows/build-all-versions.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index 46bd05b23..fde8b2157 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -56,9 +56,9 @@ jobs: cabal configure --enable-tests --enable-benchmarks --test-show-details=direct cabal build all - # - name: Test - # run: | - # cabal test all + - name: Test + run: | + cabal test all stack: name: stack / ghc ${{ matrix.ghc }} @@ -90,6 +90,6 @@ jobs: stack build --system-ghc --stack-yaml stack-ghc${{ matrix.ghc }}.yaml # stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks - # - name: Test - # run: | - # stack test --system-ghc + - name: Test + run: | + stack test --system-ghc --stack-yaml stack-ghc${{ matrix.ghc }}.yaml -- cgit v1.2.3 From 02671cafd0049f0793206a7d13c47a74e89ae2e8 Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Thu, 17 Jun 2021 20:20:18 +0800 Subject: Disable cabal tests The test suite isn't currently able to find the gf executable on cabal --- .github/workflows/build-all-versions.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index fde8b2157..fca637189 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -56,9 +56,9 @@ jobs: cabal configure --enable-tests --enable-benchmarks --test-show-details=direct cabal build all - - name: Test - run: | - cabal test all + # - name: Test + # run: | + # cabal test all stack: name: stack / ghc ${{ matrix.ghc }} -- cgit v1.2.3 From c2ffa6763bb36956f9b353c2d2cd6711ab0796f5 Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Sun, 29 Nov 2020 21:36:11 +0100 Subject: Github actions: Fix build for stack --- .github/workflows/build-all-versions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index fca637189..f4ba6a2f1 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - cabal: ["3.2"] + cabal: ["latest"] ghc: - "8.6.5" - "8.8.3" @@ -65,7 +65,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - stack: ["2.3.3"] + stack: ["latest"] ghc: ["7.10.3","8.0.2", "8.2.2", "8.4.4", "8.6.5", "8.8.4"] # ghc: ["8.8.3"] -- cgit v1.2.3 From 4f256447e27a9537ad6a271b5709f71f9039672b Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 22 Jul 2021 22:27:15 +0200 Subject: Add separate Windows binary CI action for easier testing --- .github/workflows/build-windows-binary.yml | 91 ++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .github/workflows/build-windows-binary.yml (limited to '.github/workflows') diff --git a/.github/workflows/build-windows-binary.yml b/.github/workflows/build-windows-binary.yml new file mode 100644 index 000000000..0c0570cf8 --- /dev/null +++ b/.github/workflows/build-windows-binary.yml @@ -0,0 +1,91 @@ +name: Build Windows Binary + +on: + push: + +jobs: + windows: + name: Build Windows package + runs-on: windows-2019 + strategy: + matrix: + ghc: ["8.6.5"] + cabal: ["2.4"] + + steps: + - uses: actions/checkout@v2 + + - name: Setup MSYS2 + uses: msys2/setup-msys2@v2 + with: + install: >- + base-devel + gcc + python-devel + + - name: Prepare dist folder + shell: msys2 {0} + run: | + mkdir /c/tmp-dist + mkdir /c/tmp-dist/c + mkdir /c/tmp-dist/java + mkdir /c/tmp-dist/python + + - name: Build C runtime + shell: msys2 {0} + run: | + cd src/runtime/c + autoreconf -i + ./configure + make + make install + cp /mingw64/bin/libpgf-0.dll /c/tmp-dist/c + cp /mingw64/bin/libgu-0.dll /c/tmp-dist/c + + - name: Build Java bindings + shell: msys2 {0} + run: | + export PATH="${PATH}:/c/Program Files/Java/jdk8u275-b01/bin" + cd src/runtime/java + make \ + JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ + WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" + make install + cp .libs//msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll + cp jpgf.jar /c/tmp-dist/java + + - name: Build Python bindings + shell: msys2 {0} + env: + EXTRA_INCLUDE_DIRS: /mingw64/include + EXTRA_LIB_DIRS: /mingw64/lib + run: | + cd src/runtime/python + python setup.py build + python setup.py install + cp /usr/lib/python3.8/site-packages/pgf* /c/tmp-dist/python + + - name: Setup Haskell + uses: actions/setup-haskell@v1 + id: setup-haskell-cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + - name: Install Haskell build tools + run: | + cabal install alex happy + + - name: Build GF + run: | + cabal install --only-dependencies -fserver + cabal configure -fserver + cabal build + copy dist\build\gf\gf.exe C:\tmp-dist + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: gf-${{ github.sha }}-windows + path: C:\tmp-dist\* + if-no-files-found: error -- cgit v1.2.3 From 7b9bb780a2f8c296270987c8e4c146b3b73b76b0 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 22 Jul 2021 22:34:26 +0200 Subject: Find Java stuff --- .github/workflows/build-windows-binary.yml | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build-windows-binary.yml b/.github/workflows/build-windows-binary.yml index 0c0570cf8..60c13d4f7 100644 --- a/.github/workflows/build-windows-binary.yml +++ b/.github/workflows/build-windows-binary.yml @@ -23,6 +23,11 @@ jobs: gcc python-devel + - name: Find Java stuff + shell: msys2 {0} + run: | + find /c -name "jni.h" + - name: Prepare dist folder shell: msys2 {0} run: | -- cgit v1.2.3 From c67fe05c0896c6eff1eca8fc1f1ab5559c918bcb Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 22 Jul 2021 22:44:53 +0200 Subject: Narrow search, print env var --- .github/workflows/build-windows-binary.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-windows-binary.yml b/.github/workflows/build-windows-binary.yml index 60c13d4f7..b30c7648a 100644 --- a/.github/workflows/build-windows-binary.yml +++ b/.github/workflows/build-windows-binary.yml @@ -26,7 +26,8 @@ jobs: - name: Find Java stuff shell: msys2 {0} run: | - find /c -name "jni.h" + echo $JAVA_HOME_8_X64 + find "/c/Program Files/Java" -name "jni.h" - name: Prepare dist folder shell: msys2 {0} -- cgit v1.2.3 From 7674f078d61fac8f193886c1e1dfe803e479f6de Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 22 Jul 2021 22:49:44 +0200 Subject: Try another path --- .github/workflows/build-windows-binary.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-windows-binary.yml b/.github/workflows/build-windows-binary.yml index b30c7648a..46a34d7f1 100644 --- a/.github/workflows/build-windows-binary.yml +++ b/.github/workflows/build-windows-binary.yml @@ -26,8 +26,7 @@ jobs: - name: Find Java stuff shell: msys2 {0} run: | - echo $JAVA_HOME_8_X64 - find "/c/Program Files/Java" -name "jni.h" + find "/c/hostedtoolcache/windows/Java_Adopt_jdk" -name "jni.h" - name: Prepare dist folder shell: msys2 {0} -- cgit v1.2.3 From 2610219f6a4d43d53d43c04c12f597c9b2eba39e Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 22 Jul 2021 22:56:39 +0200 Subject: Update path --- .github/workflows/build-windows-binary.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-windows-binary.yml b/.github/workflows/build-windows-binary.yml index 46a34d7f1..be39f357b 100644 --- a/.github/workflows/build-windows-binary.yml +++ b/.github/workflows/build-windows-binary.yml @@ -23,11 +23,6 @@ jobs: gcc python-devel - - name: Find Java stuff - shell: msys2 {0} - run: | - find "/c/hostedtoolcache/windows/Java_Adopt_jdk" -name "jni.h" - - name: Prepare dist folder shell: msys2 {0} run: | @@ -47,13 +42,15 @@ jobs: cp /mingw64/bin/libpgf-0.dll /c/tmp-dist/c cp /mingw64/bin/libgu-0.dll /c/tmp-dist/c + # JAVA_HOME_8_X64 = C:\hostedtoolcache\windows\Java_Adopt_jdk\8.0.292-10\x64 - name: Build Java bindings shell: msys2 {0} run: | - export PATH="${PATH}:/c/Program Files/Java/jdk8u275-b01/bin" + export JDKPATH=/c/hostedtoolcache/windows/Java_Adopt_jdk/8.0.292-10/x64 + export PATH="${PATH}:${JDKPATH}/bin" cd src/runtime/java make \ - JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ + JNI_INCLUDES="-I \"${JDKPATH}/include\" -I \"${JDKPATH}/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install cp .libs//msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll -- cgit v1.2.3 From 0d6c67f6b10ad542f9f74045b450177657ed6ac3 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 22 Jul 2021 23:02:22 +0200 Subject: Try without rewriting envvar --- .github/workflows/build-windows-binary.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-windows-binary.yml b/.github/workflows/build-windows-binary.yml index be39f357b..42a8c516f 100644 --- a/.github/workflows/build-windows-binary.yml +++ b/.github/workflows/build-windows-binary.yml @@ -42,19 +42,18 @@ jobs: cp /mingw64/bin/libpgf-0.dll /c/tmp-dist/c cp /mingw64/bin/libgu-0.dll /c/tmp-dist/c - # JAVA_HOME_8_X64 = C:\hostedtoolcache\windows\Java_Adopt_jdk\8.0.292-10\x64 - name: Build Java bindings shell: msys2 {0} run: | - export JDKPATH=/c/hostedtoolcache/windows/Java_Adopt_jdk/8.0.292-10/x64 - export PATH="${PATH}:${JDKPATH}/bin" + export PATH="${PATH}:${JAVA_HOME_8_X64}/bin" cd src/runtime/java make \ - JNI_INCLUDES="-I \"${JDKPATH}/include\" -I \"${JDKPATH}/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ + JNI_INCLUDES="-I \"${JAVA_HOME_8_X64}/include\" -I \"${JAVA_HOME_8_X64}/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install - cp .libs//msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll + cp .libs/msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll cp jpgf.jar /c/tmp-dist/java + ls -al /c/tmp/dist/java - name: Build Python bindings shell: msys2 {0} -- cgit v1.2.3 From 7fdbf3f40080d3f23eb4514eb4533893021aed6d Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 22 Jul 2021 23:11:01 +0200 Subject: Update path in main workflow for binaries --- .github/workflows/build-binary-packages.yml | 8 ++- .github/workflows/build-windows-binary.yml | 92 ----------------------------- 2 files changed, 5 insertions(+), 95 deletions(-) delete mode 100644 .github/workflows/build-windows-binary.yml (limited to '.github/workflows') diff --git a/.github/workflows/build-binary-packages.yml b/.github/workflows/build-binary-packages.yml index 810fa1352..8770bed3e 100644 --- a/.github/workflows/build-binary-packages.yml +++ b/.github/workflows/build-binary-packages.yml @@ -136,16 +136,18 @@ jobs: cp /mingw64/bin/libpgf-0.dll /c/tmp-dist/c cp /mingw64/bin/libgu-0.dll /c/tmp-dist/c + # JAVA_HOME_8_X64 = C:\hostedtoolcache\windows\Java_Adopt_jdk\8.0.292-10\x64 - name: Build Java bindings shell: msys2 {0} run: | - export PATH="${PATH}:/c/Program Files/Java/jdk8u275-b01/bin" + export JDKPATH=/c/hostedtoolcache/windows/Java_Adopt_jdk/8.0.292-10/x64 + export PATH="${PATH}:${JDKPATH}/bin" cd src/runtime/java make \ - JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ + JNI_INCLUDES="-I \"${JDKPATH}/include\" -I \"${JDKPATH}/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install - cp .libs//msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll + cp .libs/msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll cp jpgf.jar /c/tmp-dist/java - name: Build Python bindings diff --git a/.github/workflows/build-windows-binary.yml b/.github/workflows/build-windows-binary.yml deleted file mode 100644 index 42a8c516f..000000000 --- a/.github/workflows/build-windows-binary.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: Build Windows Binary - -on: - push: - -jobs: - windows: - name: Build Windows package - runs-on: windows-2019 - strategy: - matrix: - ghc: ["8.6.5"] - cabal: ["2.4"] - - steps: - - uses: actions/checkout@v2 - - - name: Setup MSYS2 - uses: msys2/setup-msys2@v2 - with: - install: >- - base-devel - gcc - python-devel - - - name: Prepare dist folder - shell: msys2 {0} - run: | - mkdir /c/tmp-dist - mkdir /c/tmp-dist/c - mkdir /c/tmp-dist/java - mkdir /c/tmp-dist/python - - - name: Build C runtime - shell: msys2 {0} - run: | - cd src/runtime/c - autoreconf -i - ./configure - make - make install - cp /mingw64/bin/libpgf-0.dll /c/tmp-dist/c - cp /mingw64/bin/libgu-0.dll /c/tmp-dist/c - - - name: Build Java bindings - shell: msys2 {0} - run: | - export PATH="${PATH}:${JAVA_HOME_8_X64}/bin" - cd src/runtime/java - make \ - JNI_INCLUDES="-I \"${JAVA_HOME_8_X64}/include\" -I \"${JAVA_HOME_8_X64}/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ - WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" - make install - cp .libs/msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll - cp jpgf.jar /c/tmp-dist/java - ls -al /c/tmp/dist/java - - - name: Build Python bindings - shell: msys2 {0} - env: - EXTRA_INCLUDE_DIRS: /mingw64/include - EXTRA_LIB_DIRS: /mingw64/lib - run: | - cd src/runtime/python - python setup.py build - python setup.py install - cp /usr/lib/python3.8/site-packages/pgf* /c/tmp-dist/python - - - name: Setup Haskell - uses: actions/setup-haskell@v1 - id: setup-haskell-cabal - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - - name: Install Haskell build tools - run: | - cabal install alex happy - - - name: Build GF - run: | - cabal install --only-dependencies -fserver - cabal configure -fserver - cabal build - copy dist\build\gf\gf.exe C:\tmp-dist - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: gf-${{ github.sha }}-windows - path: C:\tmp-dist\* - if-no-files-found: error -- cgit v1.2.3 From 4df8999ed5d477aae92bfa8c0d9e814930d9d4c5 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Fri, 23 Jul 2021 08:05:35 +0200 Subject: Change Python 3.8 to 3.9 --- .github/workflows/build-binary-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-binary-packages.yml b/.github/workflows/build-binary-packages.yml index 8770bed3e..53f039714 100644 --- a/.github/workflows/build-binary-packages.yml +++ b/.github/workflows/build-binary-packages.yml @@ -159,7 +159,7 @@ jobs: cd src/runtime/python python setup.py build python setup.py install - cp /usr/lib/python3.8/site-packages/pgf* /c/tmp-dist/python + cp /usr/lib/python3.9/site-packages/pgf* /c/tmp-dist/python - name: Setup Haskell uses: actions/setup-haskell@v1 -- cgit v1.2.3 From e3498d5ead8c98d6719e94e575ed9242838491cf Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Wed, 30 Jun 2021 15:11:05 +0800 Subject: Update to newest haskell github action Also fix so the stack builds use the correct ghc versions --- .github/workflows/build-all-versions.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index f4ba6a2f1..9ab8a0622 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v2 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' - - uses: actions/setup-haskell@v1.1.4 + - uses: haskell/actions/setup@v1 id: setup-haskell-cabal name: Setup Haskell with: @@ -73,11 +73,12 @@ jobs: - uses: actions/checkout@v2 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' - - uses: actions/setup-haskell@v1.1.4 + - uses: haskell/actions/setup@v1 name: Setup Haskell Stack with: - # ghc-version: ${{ matrix.ghc }} - stack-version: ${{ matrix.stack }} + ghc-version: ${{ matrix.ghc }} + stack-version: 'latest' + enable-stack: true - uses: actions/cache@v1 name: Cache ~/.stack -- cgit v1.2.3 From 3c4f42db15b92ea5de24147b3cbfba195837170f Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Tue, 6 Jul 2021 15:51:16 +0800 Subject: Build ubuntu packages on ubuntu-latest Fixes #74 --- .github/workflows/build-binary-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-binary-packages.yml b/.github/workflows/build-binary-packages.yml index 53f039714..1893f5569 100644 --- a/.github/workflows/build-binary-packages.yml +++ b/.github/workflows/build-binary-packages.yml @@ -10,7 +10,7 @@ jobs: ubuntu: name: Build Ubuntu package - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest # strategy: # matrix: # ghc: ["8.6.5"] -- cgit v1.2.3 From 375b3cf285078224d013437eed0bc4b0f75ba35b Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Thu, 22 Jul 2021 09:06:31 +0800 Subject: Update release script to build for two ubuntu versions --- .github/workflows/build-binary-packages.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-binary-packages.yml b/.github/workflows/build-binary-packages.yml index 1893f5569..0931dce0e 100644 --- a/.github/workflows/build-binary-packages.yml +++ b/.github/workflows/build-binary-packages.yml @@ -10,11 +10,13 @@ jobs: ubuntu: name: Build Ubuntu package - runs-on: ubuntu-latest - # strategy: - # matrix: - # ghc: ["8.6.5"] - # cabal: ["2.4"] + strategy: + matrix: + os: + - ubuntu-18.04 + - ubuntu-20.04 + + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -53,7 +55,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: gf-${{ github.sha }}-ubuntu + name: gf-${{ github.sha }}-${{ matrix.os }} path: dist/gf_*.deb if-no-files-found: error -- cgit v1.2.3 From 8814fde817af010e6c17ff8829eceb008dfa5f72 Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Thu, 22 Jul 2021 09:50:35 +0800 Subject: Only run the script once per release --- .github/workflows/build-binary-packages.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-binary-packages.yml b/.github/workflows/build-binary-packages.yml index 0931dce0e..ccc7dd7d7 100644 --- a/.github/workflows/build-binary-packages.yml +++ b/.github/workflows/build-binary-packages.yml @@ -2,7 +2,8 @@ name: Build Binary Packages on: workflow_dispatch: - release: + release: + types: ["created"] jobs: -- cgit v1.2.3 From 6ef4f27d325253e127ccf3c64faf4a54c727f384 Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Thu, 22 Jul 2021 09:23:16 +0800 Subject: Upload release assets automatically as well --- .github/workflows/build-binary-packages.yml | 35 ++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-binary-packages.yml b/.github/workflows/build-binary-packages.yml index ccc7dd7d7..4c4e137df 100644 --- a/.github/workflows/build-binary-packages.yml +++ b/.github/workflows/build-binary-packages.yml @@ -56,19 +56,29 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: gf-${{ github.sha }}-${{ matrix.os }} + name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb path: dist/gf_*.deb if-no-files-found: error + - uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: dist/gf_*.deb + asset_name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb + asset_content_type: application/octet-stream + # --- macos: name: Build macOS package - runs-on: macos-10.15 strategy: matrix: ghc: ["8.6.5"] cabal: ["2.4"] + os: ["macos-10.15"] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -99,15 +109,25 @@ jobs: path: dist/gf-*.pkg if-no-files-found: error + - uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: dist/gf_*.pkg + asset_name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb + asset_content_type: application/octet-stream + # --- windows: name: Build Windows package - runs-on: windows-2019 strategy: matrix: ghc: ["8.6.5"] cabal: ["2.4"] + os: ["windows-2019"] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -188,3 +208,12 @@ jobs: name: gf-${{ github.sha }}-windows path: C:\tmp-dist\* if-no-files-found: error + + - uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: C:\tmp-dist\* + asset_name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }} + asset_content_type: application/octet-stream -- cgit v1.2.3 From 1867bfc8a1676ba50d5bbff3024615730d03528b Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Sun, 25 Jul 2021 11:08:21 +0800 Subject: Rename packages based on git tag --- .github/workflows/build-binary-packages.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build-binary-packages.yml b/.github/workflows/build-binary-packages.yml index 4c4e137df..493d5e774 100644 --- a/.github/workflows/build-binary-packages.yml +++ b/.github/workflows/build-binary-packages.yml @@ -60,12 +60,16 @@ jobs: path: dist/gf_*.deb if-no-files-found: error + - name: Rename package for specific ubuntu version + run: | + mv dist/gf_*.deb dist/gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb + - uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: dist/gf_*.deb + asset_path: dist/gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb asset_name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb asset_content_type: application/octet-stream @@ -105,17 +109,21 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: gf-${{ github.sha }}-macos + name: gf-${{ github.event.release.tag_name }}-macos path: dist/gf-*.pkg if-no-files-found: error + + - name: Rename package + run: | + mv dist/gf-*.pkg dist/gf-${{ github.event.release.tag_name }}-macos.pkg - uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: dist/gf_*.pkg - asset_name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb + asset_path: dist/gf-${{ github.event.release.tag_name }}-macos.pkg + asset_name: gf-${{ github.event.release.tag_name }}-macos.pkg asset_content_type: application/octet-stream # --- @@ -205,15 +213,18 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: gf-${{ github.sha }}-windows + name: gf-${{ github.event.release.tag_name }}-windows path: C:\tmp-dist\* if-no-files-found: error + - name: Create archive + run: | + Compress-Archive C:\tmp-dist C:\gf-${{ github.event.release.tag_name }}-windows.zip - uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: C:\tmp-dist\* - asset_name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }} - asset_content_type: application/octet-stream + asset_path: C:\gf-${{ github.event.release.tag_name }}-windows.zip + asset_name: gf-${{ github.event.release.tag_name }}-windows.zip + asset_content_type: application/zip -- cgit v1.2.3