From 3f948126a30805cd89f29a537907e5a036e1bc3b Mon Sep 17 00:00:00 2001 From: Willy Date: Sat, 2 Oct 2021 16:13:42 +0200 Subject: [PATCH] catch up with workflow changes * I was gone for a while and will try to catch up with upstream changes in the next couple of commits * since git can't know I'm "combining" multiple files, an automatic merge wouldn't work here * added todo comments on places that will need special attention * dockerfiles still need merging -> this commit is broken! (only using it to keep track of external changes) --- .github/workflows/build.yml | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7baa0236..aaa1dc72 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -91,11 +91,13 @@ jobs: matrix: platform: [linux] arch: [386, amd64, arm-7, arm-6, arm64] -# include: -# - platform: darwin -# arch: amd64 -# - platform: windows -# arch: amd64 + include: + - platform: darwin + arch: 386 + - platform: darwin + arch: amd64 + - platform: windows + arch: [amd64, 386] steps: - uses: actions/checkout@v2 @@ -136,7 +138,7 @@ jobs: - name: Set Windows Build Flags if: matrix.platform == 'windows' run: | - echo "BUILD_FLAGS=-extldflags -static" >> $GITHUB_ENV + echo "BUILD_FLAGS=-extldflags -static -buildmode=exe" >> $GITHUB_ENV echo "XGO_TAGS=netgo osusergo sqlite_omit_load_extension" >> $GITHUB_ENV shell: bash @@ -179,16 +181,30 @@ jobs: rm -rf statping.exe echo "compressed=statping-windows-${{ matrix.arch }}.zip" >> $GITHUB_ENV - - name: Compress Darwin Builds - if: matrix.platform == 'darwin' + # TODO combine these steps? + - name: Compress Darwin 32bit Builds + if: matrix.platform == 'darwin' && matrix.arch == '386' run: | cd build - mv statping-darwin-10.6-${{ matrix.arch }} statping + ls >> $GITHUB_ENV + # mv statping-darwin-10.6-${{ matrix.arch }} statping + # chmod +x statping + # tar -czvf statping-darwin-${{ matrix.arch }}.tar.gz * + # rm -rf statping + # echo "compressed=statping-darwin-${{ matrix.arch }}.tar.gz" >> $GITHUB_ENV + + - name: Compress Darwin 64bit Builds + if: matrix.platform == 'darwin' && matrix.arch == 'amd64' + run: | + cd build + mv statping-darwin-10.12-${{ matrix.arch }} statping chmod +x statping tar -czvf statping-darwin-${{ matrix.arch }}.tar.gz statping rm -rf statping echo "compressed=statping-darwin-${{ matrix.arch }}.tar.gz" >> $GITHUB_ENV + # TODO darwin arm64? + - name: Upload Compiled Statping Binary uses: actions/upload-artifact@v1 with: @@ -528,12 +544,14 @@ jobs: restore-keys: | buildx-docker-master + # TODO duplicate login why? - name: Docker Login env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin + # TODO get rid of the base image - name: Docker Build :base run: make buildx-base