From f757337fb5d1e07d5b6cfea6a8278af84da6ceb4 Mon Sep 17 00:00:00 2001 From: Brandon Bloom Date: Fri, 8 Oct 2021 11:21:42 -0700 Subject: [PATCH] Use ghcr.io/deref/golang-cross --- .github/workflows/perform-release.yaml | 69 +++++++------------------- VERSION | 2 +- 2 files changed, 20 insertions(+), 51 deletions(-) diff --git a/.github/workflows/perform-release.yaml b/.github/workflows/perform-release.yaml index ac15f5afe..2b364fa72 100644 --- a/.github/workflows/perform-release.yaml +++ b/.github/workflows/perform-release.yaml @@ -82,36 +82,13 @@ jobs: publish-binaries: runs-on: ubuntu-latest - container: - image: troian/golang-cross needs: - create-release strategy: matrix: - include: - - goos: darwin - goarch: amd64 - target: x86_64-macos - - goos: darwin - goarch: arm64 - target: aarch64-macos - - goos: linux - goarch: amd64 - target: x86_64-linux + goos: [linux, darwin] + goarch: [amd64, arm64] steps: - # TODO: Is it possible to use https://github.com/marketplace/actions/setup-zig instead? - - name: Install Zig for Cross Compilation - run: | - export DEBIAN_FRONTEND="noninteractive" - apt update - apt install -y \ - wget \ - xz-utils - cd /opt - zig_build=zig-linux-x86_64-0.9.0-dev.1324+598db831f - wget --quiet https://ziglang.org/builds/${zig_build}.tar.xz - tar -xvf $PWD/${zig_build}.tar.xz - ln -s $PWD/${zig_build} zig - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: @@ -121,14 +98,10 @@ jobs: uses: actions/setup-node@v2 with: node-version: 15.x - - name: Jank some crap in to gui - run: | - mkdir gui/dist - echo 'FIXME' > gui/dist/junk - #- run: npm ci - # working-directory: gui - #- run: npm run build - # working-directory: gui + - run: npm ci + working-directory: gui + - run: npm run build + working-directory: gui - name: Get version from VERSION file id: get_version @@ -148,24 +121,20 @@ jobs: echo "artifact_dir=$ARTIFACT_DIR" >> $GITHUB_ENV echo "binary_path=${ARTIFACT_DIR}/${BINARY_NAME}" >> $GITHUB_ENV - name: Build - env: - CGO_ENABLED: 1 - GOOS: ${{ matrix.goos }} - GOARCH: ${{ matrix.goarch }} - CC: zcc - CXX: zxx run: | mkdir -p "${{ env.artifact_dir }}" - cat < /bin/zcc - #!/bin/sh - ZIG_LOCAL_CACHE_DIR="\$HOME/tmp" /opt/zig/zig cc -target ${{ matrix.target }} \$@ - ! - cat < /bin/zxx - #!/bin/sh - ZIG_LOCAL_CACHE_DIR="\$HOME/tmp" /opt/zig/zig c++ -target ${{ matrix.target }} \$@ - ! - chmod +x /bin/zcc /bin/zxx - go build -tags bundle -o "${{ env.binary_path }}" + go build . + docker run \ + -e GOOS=${{ matrix.goos }} \ + -e GOARCH=${{ matrix.goarch }} \ + --mount "type=bind,source=${PWD},target=/go/src/exo" \ + --mount "type=bind,source=${HOME}/go/pkg/mod,target=/go/pkg/mod" \ + -w /go/src/exo \ + ghcr.io/deref/golang-cross \ + go build \ + -tags bundle \ + -o "${{ env.binary_path }}" \ + . sha256sum "${{ env.binary_path }}" | cut -d ' ' -f 1 > "${{ env.binary_path }}.sha256" - name: Set upload URL id: get_release_info @@ -194,7 +163,7 @@ jobs: asset_content_type: text/plain update-version: - if: false # XXX Temporarily disabled. + if: false # XXX Temporarily disable runs-on: ubuntu-latest needs: - publish-binaries diff --git a/VERSION b/VERSION index 430323954..0aa0a8d5c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2021.10.07_7 \ No newline at end of file +2021.10.08 \ No newline at end of file