From b0f63c7db650d5ede60b704308e6c0463be3998f Mon Sep 17 00:00:00 2001 From: mib Date: Tue, 7 Jun 2022 23:06:32 +0200 Subject: [PATCH 01/37] ci: add base --- .github/workflows/build.yaml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..ece52f7 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,44 @@ +name: Build static binaries + +on: push +# on: +# release: +# types: [created] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + name: Build for ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + steps: + - name: Download build tools + run: sudo apt-get install build-essential libtool autopoint + - name: Checkout repository + uses: actions/checkout@v3 + - name: Download dependencies + run: git submodule update --init --recursive + - name: Setup go + uses: actions/setup-go@v3 + with: + go-version: '^1.18.2' + - name: Info + run: tree + - name: Build dependencies + run: go run build.go -verbose build-all + - name: Show libs + run: go run build.go show-libs + - name: Info + run: tree tor + - name: Upload tor binary + uses: actions/upload-artifact@v3 + with: + name: tor-${{ matrix.os }} + path: + tor/src/app/tor From 70c661f484f66b316ba49b179b8e775114d03864 Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 01:27:31 +0200 Subject: [PATCH 02/37] mac-os support --- .github/workflows/build.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ece52f7..14b004a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,10 +16,16 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, macos-latest] steps: + # Download dependencies depending on platform - name: Download build tools + if: matrix.os == "ubuntu-latest" run: sudo apt-get install build-essential libtool autopoint + - name: Download build tools + if: matrix.os == "macos-latest" + run: sudo brew install libtool automake gettext + - name: Checkout repository uses: actions/checkout@v3 - name: Download dependencies From 394ade69832892862143a859cbfc96bc772ad996 Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 01:29:49 +0200 Subject: [PATCH 03/37] fix if-statements --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 14b004a..3d84012 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,10 +20,10 @@ jobs: steps: # Download dependencies depending on platform - name: Download build tools - if: matrix.os == "ubuntu-latest" + if: matrix.os == 'ubuntu-latest' run: sudo apt-get install build-essential libtool autopoint - name: Download build tools - if: matrix.os == "macos-latest" + if: matrix.os == 'macos-latest' run: sudo brew install libtool automake gettext - name: Checkout repository From 39f74da93ef75db8c8ebaf6018dce7fa75373264 Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 01:33:34 +0200 Subject: [PATCH 04/37] don't run brew as root --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3d84012..f603f87 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,7 +24,7 @@ jobs: run: sudo apt-get install build-essential libtool autopoint - name: Download build tools if: matrix.os == 'macos-latest' - run: sudo brew install libtool automake gettext + run: brew install libtool automake gettext - name: Checkout repository uses: actions/checkout@v3 From 0ea1ffc502c3e84008f753a94da2e3c09ad6fa7e Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 01:39:13 +0200 Subject: [PATCH 05/37] remove debug steps they were kinda preventing macos from building correctly, so... --- .github/workflows/build.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f603f87..67bd03e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -34,14 +34,8 @@ jobs: uses: actions/setup-go@v3 with: go-version: '^1.18.2' - - name: Info - run: tree - name: Build dependencies run: go run build.go -verbose build-all - - name: Show libs - run: go run build.go show-libs - - name: Info - run: tree tor - name: Upload tor binary uses: actions/upload-artifact@v3 with: From 2a1f5550055d7b139ca01d9ffdd275c8b40ad70b Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 01:51:50 +0200 Subject: [PATCH 06/37] label the 'download build tool' steps --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 67bd03e..85f7495 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,10 +19,10 @@ jobs: os: [ubuntu-latest, macos-latest] steps: # Download dependencies depending on platform - - name: Download build tools + - name: Download build tools [linux] if: matrix.os == 'ubuntu-latest' run: sudo apt-get install build-essential libtool autopoint - - name: Download build tools + - name: Download build tools [mac] if: matrix.os == 'macos-latest' run: brew install libtool automake gettext From a88a1ea422251a398bec3c95df92349cf05cb02d Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 14:19:11 +0200 Subject: [PATCH 07/37] remove other CI configs --- .appveyor.yml | 47 ----------------------------------------------- .travis.yml | 50 -------------------------------------------------- 2 files changed, 97 deletions(-) delete mode 100644 .appveyor.yml delete mode 100644 .travis.yml diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index d72fbfc..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,47 +0,0 @@ -version: '{build}' -platform: x64 -configuration: Release -os: Visual Studio 2015 - -clone_depth: 50 -clone_folder: c:\gopath\src\github.com\cretz\tor-static - -environment: - GOPATH: c:\gopath - -install: - - set PATH=C:\msys64\usr\bin;%PATH% - - set MSYSTEM=MINGW64 - - bash -lc "pacman -Sy --noconfirm --needed base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain git mingw-w64-i686-cmake mingw-w64-x86_64-cmake" - -before_build: - - set MSYSTEM=MINGW64 - - cd c:\gopath\src\github.com\cretz\tor-static - - git submodule update --init --recursive - -build_script: - - set MSYSTEM=MINGW64 - - bash -lc "export PATH=/mingw64/bin:$PATH && cd /c/gopath/src/github.com/cretz/tor-static && /c/go/bin/go run build.go -verbose build-all" - -test_script: - - set PATH=C:\msys64\mingw64\bin;%PATH% - - go get -u github.com/cretz/bine/tor - - cd c:\gopath\src\github.com\cretz\tor-static - - go test -v build_test.go -tor.verbose - -after_build: - - go run build.go package-libs - - cp libs.zip tor-static-windows-amd64.zip -artifacts: -- path: tor-static-windows-amd64.zip - -deploy: - description: 'New tor-static release' - provider: GitHub - auth_token: - secure: 6FeJJsz3att0ChUBBFt+Llk8vr32vvZVDbkicQfpRn0mJrome0mIPbkLbH2J5ejC - artifact: tor-static-windows-amd64.zip - draft: true - on: - branch: master - APPVEYOR_REPO_TAG: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 755c9d8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -language: go -go: 1.11.x -sudo: false - -stages: - - name: deploy - if: branch = master - -matrix: - include: - - name: linux-amd64 - os: linux - dist: xenial - env: CGO_ENABLED=1 GOOS=linux GOARCH=amd64 - install: - - sudo apt-get install build-essential - - sudo apt-get install libtool - - sudo apt-get install autopoint - - name: darwin-amd64 - os: osx - env: CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 - install: - - brew install libtool - - brew install gettext - -before_script: - - go run build.go -verbose build-all - -script: - - go get -u github.com/cretz/bine/tor - - go test -v build_test.go -tor.verbose - -after_script: - - go run build.go package-libs - -after_success: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv libs.tar.gz tor-static-linux-amd64.tar.gz; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mv libs.tar.gz tor-static-darwin-amd64.tar.gz; fi - -deploy: - provider: releases - api_key: "${GITHUB_PAT}" - file: - - tor-static-linux-amd64.tar.gz - - tor-static-darwin-amd64.tar.gz - skip_cleanup: true - draft: true - on: - repo: cretz/tor-static - tags: true \ No newline at end of file From e59e91b323ac34e2bc003ef710b41723e7d07d6d Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 14:31:12 +0200 Subject: [PATCH 08/37] change go version as per https://github.com/cretz/tor-static/issues/13#issuecomment-1149224050 --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 85f7495..9e62c66 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -33,7 +33,7 @@ jobs: - name: Setup go uses: actions/setup-go@v3 with: - go-version: '^1.18.2' + go-version: '^1.17.0' - name: Build dependencies run: go run build.go -verbose build-all - name: Upload tor binary From ef2ac53fc8758908c38239285246ba7f5d0fccef Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 15:32:00 +0200 Subject: [PATCH 09/37] windows support --- .github/workflows/build.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9e62c66..feb2670 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] steps: # Download dependencies depending on platform - name: Download build tools [linux] @@ -25,6 +25,9 @@ jobs: - name: Download build tools [mac] if: matrix.os == 'macos-latest' run: brew install libtool automake gettext + - name: Setup MinGW [windows] + if: matrix.os == 'windows-latest' + uses: egor-tensin/setup-mingw@v2 - name: Checkout repository uses: actions/checkout@v3 From 29cfebd097d94a4fc121f075f553d9736681fe8b Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 15:44:56 +0200 Subject: [PATCH 10/37] use runner.os envs instead seems like they're the "standard", and this allows for flexibility in specifying runner OS versions. --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index feb2670..b739558 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,13 +20,13 @@ jobs: steps: # Download dependencies depending on platform - name: Download build tools [linux] - if: matrix.os == 'ubuntu-latest' + if: runner.os == 'Linux' run: sudo apt-get install build-essential libtool autopoint - name: Download build tools [mac] - if: matrix.os == 'macos-latest' + if: runner.os == 'macOS' run: brew install libtool automake gettext - name: Setup MinGW [windows] - if: matrix.os == 'windows-latest' + if: runner.os == 'Windows' uses: egor-tensin/setup-mingw@v2 - name: Checkout repository From 8b26602ebad276d5b199e41bd8137f72cca7f604 Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 15:45:53 +0200 Subject: [PATCH 11/37] rename CI action script this is to allow for running tests afterwards. gh actions don't support cross-file workflow dependencies yet. --- .github/workflows/{build.yaml => ci.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build.yaml => ci.yaml} (100%) diff --git a/.github/workflows/build.yaml b/.github/workflows/ci.yaml similarity index 100% rename from .github/workflows/build.yaml rename to .github/workflows/ci.yaml From 2fd0dbbd7c14569e11f29e61a79996049c71772d Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 15:49:26 +0200 Subject: [PATCH 12/37] run tests --- .github/workflows/ci.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b739558..dd42491 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -45,3 +45,23 @@ jobs: name: tor-${{ matrix.os }} path: tor/src/app/tor + + test: + name: Run tests on ${{ matrix.os }} + needs: build + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Download dependencies + run: git submodule update --init --recursive + - name: Setup go + uses: actions/setup-go@v3 + with: + go-version: '^1.17.0' + - name: Run tests + run: go test . From ec0b7bc49e3db5e067cf91ba038576cd0bd12181 Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 15:51:21 +0200 Subject: [PATCH 13/37] use env for go version also cleans up env a bit; some unnecessary envvars were leftover from copy-pasting the action from another project --- .github/workflows/ci.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dd42491..8a712fd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,8 +6,7 @@ on: push # types: [created] env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} + GO_VERSION_SPECIFIER: '^1.17.0' jobs: build: @@ -36,7 +35,7 @@ jobs: - name: Setup go uses: actions/setup-go@v3 with: - go-version: '^1.17.0' + go-version: ${{ env.GO_VERSION_SPECIFIER }} - name: Build dependencies run: go run build.go -verbose build-all - name: Upload tor binary @@ -62,6 +61,6 @@ jobs: - name: Setup go uses: actions/setup-go@v3 with: - go-version: '^1.17.0' + go-version: ${{ env.GO_VERSION_SPECIFIER }} - name: Run tests run: go test . From 91f3d2b4e3fae408051414fe809f42879fcc6c2f Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 15:52:46 +0200 Subject: [PATCH 14/37] use proper OS names for artifacts --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8a712fd..c7b50db 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,7 +41,7 @@ jobs: - name: Upload tor binary uses: actions/upload-artifact@v3 with: - name: tor-${{ matrix.os }} + name: tor-${{ runner.os }} path: tor/src/app/tor From 3840e5dc69490490f01790c83531a1d0b76bf2a6 Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 15:55:16 +0200 Subject: [PATCH 15/37] remove unnecessary job dependency --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c7b50db..d746689 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -47,7 +47,6 @@ jobs: test: name: Run tests on ${{ matrix.os }} - needs: build runs-on: ${{ matrix.os }} strategy: fail-fast: false From 00fcfd093393438b7934be52c00f26b0328b9591 Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 15:58:58 +0200 Subject: [PATCH 16/37] add go modules this is needed for running tests --- go.mod | 11 +++++++++++ go.sum | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 go.mod create mode 100644 go.sum diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..d0a9b33 --- /dev/null +++ b/go.mod @@ -0,0 +1,11 @@ +module github.com/cretz/tor-static + +go 1.18 + +require github.com/cretz/bine v0.2.0 + +require ( + golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect + golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect + golang.org/x/sys v0.0.0-20210423082822-04245dca01da // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..5b169c3 --- /dev/null +++ b/go.sum @@ -0,0 +1,24 @@ +github.com/cretz/bine v0.2.0 h1:8GiDRGlTgz+o8H9DSnsl+5MeBK4HsExxgl6WgzOCuZo= +github.com/cretz/bine v0.2.0/go.mod h1:WU4o9QR9wWp8AVKtTM1XD5vUHkEqnf2vVSo6dBqbetI= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a h1:kr2P4QFmQr29mSLA43kwrOcgcReGTfbE9N577tCTuBc= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 02b171502efa11c59074e8af21b98dee3d6b09f9 Mon Sep 17 00:00:00 2001 From: mib Date: Sat, 11 Jun 2022 16:03:43 +0200 Subject: [PATCH 17/37] run tests using dependencies from build step --- .github/workflows/ci.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d746689..3e202e7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -44,9 +44,20 @@ jobs: name: tor-${{ runner.os }} path: tor/src/app/tor + - name: Upload dependencies + uses: actions/upload-artifact@v3 + with: + name: dep-${{ runner.os }} + path: + openssl + libevent + zlib + xz + tor test: name: Run tests on ${{ matrix.os }} + needs: build runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -56,7 +67,15 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Download dependencies - run: git submodule update --init --recursive + uses: actions/download-artifact@v3 + with: + name: dep-${{ runner.os }} + path: + openssl + libevent + zlib + xz + tor - name: Setup go uses: actions/setup-go@v3 with: From 5ce4a230e7d15b00823de1ff15c6a07471602fd2 Mon Sep 17 00:00:00 2001 From: mib Date: Fri, 17 Jun 2022 13:13:36 +0200 Subject: [PATCH 18/37] fixes building with newer versions of MSYS fixes #34 --- build.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.go b/build.go index 06c5824..0623970 100644 --- a/build.go +++ b/build.go @@ -80,7 +80,7 @@ func validateEnvironment() error { // Confirm it is MinGW 64 if byts, err := exec.Command("uname", "-a").CombinedOutput(); err != nil { return fmt.Errorf("This has to be run in a MSYS or MinGW shell, uname failed: %v", err) - } else if !bytes.HasPrefix(byts, []byte("MINGW64")) && !bytes.HasPrefix(byts, []byte("MSYS2")) { + } else if !bytes.HasPrefix(byts, []byte("MINGW64")) && !bytes.HasPrefix(byts, []byte("MSYS2")) && !bytes.HasPrefix(byts, []byte("MSYS_NT")) { return fmt.Errorf("This has to be run in a MSYS or MinGW64 shell, uname output: %v", string(byts)) } case "linux": From 4cd0228088275345f2bb19b78aee2465a3bc01bc Mon Sep 17 00:00:00 2001 From: mib Date: Thu, 14 Jul 2022 12:16:03 +0200 Subject: [PATCH 19/37] run on pull request & release --- .github/workflows/ci.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3e202e7..109cd8f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,9 +1,10 @@ name: Build static binaries -on: push -# on: -# release: -# types: [created] +on: + push: + pull_request: + release: + types: [created] env: GO_VERSION_SPECIFIER: '^1.17.0' From 126ff1e6c09e878c92e83ac075b76eeb2d3b0409 Mon Sep 17 00:00:00 2001 From: mib Date: Mon, 10 Apr 2023 04:20:31 +0200 Subject: [PATCH 20/37] use caching for tests instead --- .github/workflows/ci.yaml | 46 ++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 109cd8f..2c6c34d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,12 +31,24 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Download dependencies - run: git submodule update --init --recursive - name: Setup go uses: actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION_SPECIFIER }} + - name: Cache dependencies + id: cache-deps + uses: actions/cache@v3 + with: + key: ${{ runner.os }}-deps + path: | + libevent + openssl + tor + xz + zlib + - name: Download dependencies + if: ${{ steps.cache-deps.outputs.cache-hit != 'true' }} + run: git submodule update --init --recursive - name: Build dependencies run: go run build.go -verbose build-all - name: Upload tor binary @@ -45,16 +57,6 @@ jobs: name: tor-${{ runner.os }} path: tor/src/app/tor - - name: Upload dependencies - uses: actions/upload-artifact@v3 - with: - name: dep-${{ runner.os }} - path: - openssl - libevent - zlib - xz - tor test: name: Run tests on ${{ matrix.os }} @@ -67,19 +69,19 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Download dependencies - uses: actions/download-artifact@v3 - with: - name: dep-${{ runner.os }} - path: - openssl - libevent - zlib - xz - tor - name: Setup go uses: actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION_SPECIFIER }} + - name: Cache dependencies + uses: actions/cache@v3 + with: + key: ${{ runner.os }}-deps + path: | + libevent + openssl + tor + xz + zlib - name: Run tests run: go test . From f6451a1306fed361154b6a8f17b3fd47ee8bb071 Mon Sep 17 00:00:00 2001 From: mib Date: Mon, 10 Apr 2023 12:18:56 +0200 Subject: [PATCH 21/37] make cache key dependent on submodule versions --- .github/workflows/ci.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2c6c34d..e77933d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,11 +35,14 @@ jobs: uses: actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION_SPECIFIER }} + - name: Compute cache key + id: cache-data + run: echo "::set-output name=key::${{ runner.os }}-deps-$(git submodule status | sha256sum | cut -d ' ' -f1)" - name: Cache dependencies id: cache-deps uses: actions/cache@v3 with: - key: ${{ runner.os }}-deps + key: ${{ steps.cache-data.outputs.key }} path: | libevent openssl @@ -73,10 +76,14 @@ jobs: uses: actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION_SPECIFIER }} + - name: Compute cache key + id: cache-data + run: echo "::set-output name=key::${{ runner.os }}-deps-$(git submodule status | sha256sum | cut -d ' ' -f1)" - name: Cache dependencies + id: cache-deps uses: actions/cache@v3 with: - key: ${{ runner.os }}-deps + key: ${{ steps.cache-data.outputs.key }} path: | libevent openssl From afe580459fb1ab7051f4bdf78f23c4003bcb74e6 Mon Sep 17 00:00:00 2001 From: mib Date: Mon, 10 Apr 2023 12:33:55 +0200 Subject: [PATCH 22/37] don't use deprecated set-output command --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e77933d..1c4b509 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,7 +37,7 @@ jobs: go-version: ${{ env.GO_VERSION_SPECIFIER }} - name: Compute cache key id: cache-data - run: echo "::set-output name=key::${{ runner.os }}-deps-$(git submodule status | sha256sum | cut -d ' ' -f1)" + run: echo "key=${{ runner.os }}-deps-$(git submodule status | sha256sum | cut -d ' ' -f1)" >> $GITHUB_OUTPUT - name: Cache dependencies id: cache-deps uses: actions/cache@v3 @@ -78,7 +78,7 @@ jobs: go-version: ${{ env.GO_VERSION_SPECIFIER }} - name: Compute cache key id: cache-data - run: echo "::set-output name=key::${{ runner.os }}-deps-$(git submodule status | sha256sum | cut -d ' ' -f1)" + run: echo "key=${{ runner.os }}-deps-$(git submodule status | sha256sum | cut -d ' ' -f1)" >> $GITHUB_OUTPUT - name: Cache dependencies id: cache-deps uses: actions/cache@v3 From 21824c59295f81856e5128627377967e124fdefe Mon Sep 17 00:00:00 2001 From: mib Date: Mon, 10 Apr 2023 14:40:54 +0200 Subject: [PATCH 23/37] better job names --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1c4b509..49b91bd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,7 @@ env: jobs: build: - name: Build for ${{ matrix.os }} + name: Build on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -62,7 +62,7 @@ jobs: tor/src/app/tor test: - name: Run tests on ${{ matrix.os }} + name: Tests needs: build runs-on: ${{ matrix.os }} strategy: From 0b83ed9a94af6fc53ad0a55f931cf37a6af86516 Mon Sep 17 00:00:00 2001 From: mib Date: Mon, 10 Apr 2023 15:46:34 +0200 Subject: [PATCH 24/37] cache binary builds too the whole caching the PROJECT_HASH with actions/cache and diffing it is a bit jank but honestly i'd say that it's worth it. --- .github/workflows/ci.yaml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 49b91bd..27094d7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,12 +11,18 @@ env: jobs: build: - name: Build on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: Build for ${{ matrix.triple }} + runs-on: ${{ matrix.runner-os}} strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + include: + - runner-os: ubuntu-latest + triple: x86_64-unknown-linux-gnu + - runner-os: macos-latest + triple: x86_64-apple-darwin + - runner-os: windows-latest + triple: x86_64-pc-windows-gnu steps: # Download dependencies depending on platform - name: Download build tools [linux] @@ -44,6 +50,7 @@ jobs: with: key: ${{ steps.cache-data.outputs.key }} path: | + PROJECT_HASH libevent openssl tor @@ -52,7 +59,19 @@ jobs: - name: Download dependencies if: ${{ steps.cache-deps.outputs.cache-hit != 'true' }} run: git submodule update --init --recursive + - name: Check if rebuild needed + id: check-rebuild + run: | + hash="$(sha256sum test | cut -d ' ' -f1)" + rebuild="true" + if [ -e PROJECT_HASH ]; then + if [ "$(cat PROJECT_HASH)" == "$hash" ]; then + rebuild="false"; + else echo "$hash" > PROJECT_HASH; fi + else echo "$hash" > PROJECT_HASH; fi + echo "rebuild_needed=$rebuild" >> $GITHUB_OUTPUT - name: Build dependencies + if: ${{ steps.check-rebuild.outputs.rebuild_needed != 'true' }} run: go run build.go -verbose build-all - name: Upload tor binary uses: actions/upload-artifact@v3 From bd09bf3750f6011dd8876e022dade1f3fbd11291 Mon Sep 17 00:00:00 2001 From: mib Date: Mon, 10 Apr 2023 15:55:44 +0200 Subject: [PATCH 25/37] use actual files for computing project hash --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 27094d7..6ede6b1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -62,7 +62,7 @@ jobs: - name: Check if rebuild needed id: check-rebuild run: | - hash="$(sha256sum test | cut -d ' ' -f1)" + hash="$(sha256sum go.sum build.go build_test.go | cut -d ' ' -f1)" rebuild="true" if [ -e PROJECT_HASH ]; then if [ "$(cat PROJECT_HASH)" == "$hash" ]; then From 0b122a79ba8b768594ba9609c53af0cc132575ce Mon Sep 17 00:00:00 2001 From: mib Date: Mon, 10 Apr 2023 16:14:14 +0200 Subject: [PATCH 26/37] don't use legacy backticks --- .github/workflows/ci.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6ede6b1..40df513 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -64,11 +64,8 @@ jobs: run: | hash="$(sha256sum go.sum build.go build_test.go | cut -d ' ' -f1)" rebuild="true" - if [ -e PROJECT_HASH ]; then - if [ "$(cat PROJECT_HASH)" == "$hash" ]; then - rebuild="false"; - else echo "$hash" > PROJECT_HASH; fi - else echo "$hash" > PROJECT_HASH; fi + [ "$(cat PROJECT_HASH)" == "$hash" ] && rebuild="false" + echo "$hash" > PROJECT_HASH echo "rebuild_needed=$rebuild" >> $GITHUB_OUTPUT - name: Build dependencies if: ${{ steps.check-rebuild.outputs.rebuild_needed != 'true' }} From 815ca9b5919b6d81abd558766ecaf44ca5093ffd Mon Sep 17 00:00:00 2001 From: mib Date: Mon, 10 Apr 2023 16:39:30 +0200 Subject: [PATCH 27/37] update go to 1.20 --- .github/workflows/ci.yaml | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 40df513..c9400ac 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,7 @@ on: types: [created] env: - GO_VERSION_SPECIFIER: '^1.17.0' + GO_VERSION_SPECIFIER: '^1.20.0' jobs: build: diff --git a/go.mod b/go.mod index d0a9b33..6d48559 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cretz/tor-static -go 1.18 +go 1.20 require github.com/cretz/bine v0.2.0 From dfcc4dbe67b956317c582bb040a00f51c280a29e Mon Sep 17 00:00:00 2001 From: mib Date: Tue, 11 Apr 2023 12:36:35 +0200 Subject: [PATCH 28/37] install build tools on windows --- .github/workflows/ci.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c9400ac..9e5ddcb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,10 +17,10 @@ jobs: fail-fast: false matrix: include: - - runner-os: ubuntu-latest - triple: x86_64-unknown-linux-gnu - - runner-os: macos-latest - triple: x86_64-apple-darwin + #- runner-os: ubuntu-latest + # triple: x86_64-unknown-linux-gnu + #- runner-os: macos-latest + # triple: x86_64-apple-darwin - runner-os: windows-latest triple: x86_64-pc-windows-gnu steps: @@ -34,6 +34,12 @@ jobs: - name: Setup MinGW [windows] if: runner.os == 'Windows' uses: egor-tensin/setup-mingw@v2 + - name: Download build tools [windows] + if: runner.os == 'Windows' + run: pacman -Sy --needed \ + base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain git \ + subversion mercurial libtool automake autoconf automake-wrapper \ + mingw-w64-i686-cmake mingw-w64-x86_64-cmake - name: Checkout repository uses: actions/checkout@v3 From 5dd85d207a18bf9ede6026100225480460140bb7 Mon Sep 17 00:00:00 2001 From: mib Date: Tue, 11 Apr 2023 15:37:47 +0200 Subject: [PATCH 29/37] use msys2 --- .github/workflows/ci.yaml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9e5ddcb..8fb6b52 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,15 +31,25 @@ jobs: - name: Download build tools [mac] if: runner.os == 'macOS' run: brew install libtool automake gettext - - name: Setup MinGW [windows] - if: runner.os == 'Windows' uses: egor-tensin/setup-mingw@v2 - name: Download build tools [windows] if: runner.os == 'Windows' - run: pacman -Sy --needed \ - base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain git \ - subversion mercurial libtool automake autoconf automake-wrapper \ - mingw-w64-i686-cmake mingw-w64-x86_64-cmake + uses: msys2/setup-msys2@v2 + with: + update: true + install: + base-devel + git + subversion + mercurial + libtool + automake + autoconf + automake-wrapper + mingw-w64-i686-toolchain + mingw-w64-x86_64-toolchain + mingw-w64-i686-cmake + mingw-w64-x86_64-cmake - name: Checkout repository uses: actions/checkout@v3 From 744513aeab6bc24b877a4d21aeae1afdf7ea4390 Mon Sep 17 00:00:00 2001 From: mib Date: Tue, 11 Apr 2023 15:56:22 +0200 Subject: [PATCH 30/37] debug windows' hash key --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8fb6b52..50f909b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -59,7 +59,7 @@ jobs: go-version: ${{ env.GO_VERSION_SPECIFIER }} - name: Compute cache key id: cache-data - run: echo "key=${{ runner.os }}-deps-$(git submodule status | sha256sum | cut -d ' ' -f1)" >> $GITHUB_OUTPUT + run: echo "key=${{ runner.os }}-deps-$(git submodule status | sha256sum | cut -d ' ' -f1)" | tee -a $GITHUB_OUTPUT - name: Cache dependencies id: cache-deps uses: actions/cache@v3 From 056abbbb8ac2437ae1af0c2fb3afe06bc149fce2 Mon Sep 17 00:00:00 2001 From: mib Date: Tue, 11 Apr 2023 16:03:13 +0200 Subject: [PATCH 31/37] typo --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 50f909b..1f9179e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,7 +31,6 @@ jobs: - name: Download build tools [mac] if: runner.os == 'macOS' run: brew install libtool automake gettext - uses: egor-tensin/setup-mingw@v2 - name: Download build tools [windows] if: runner.os == 'Windows' uses: msys2/setup-msys2@v2 From eb89253c4e9d52fa75ef391b4b47ae7d64058722 Mon Sep 17 00:00:00 2001 From: mib Date: Tue, 11 Apr 2023 16:38:28 +0200 Subject: [PATCH 32/37] disable caching on windows --- .github/workflows/ci.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1f9179e..0bd0fa1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,10 +19,13 @@ jobs: include: #- runner-os: ubuntu-latest # triple: x86_64-unknown-linux-gnu + # use-caching: true #- runner-os: macos-latest # triple: x86_64-apple-darwin + # use-caching: true - runner-os: windows-latest triple: x86_64-pc-windows-gnu + use-caching: false steps: # Download dependencies depending on platform - name: Download build tools [linux] @@ -57,9 +60,11 @@ jobs: with: go-version: ${{ env.GO_VERSION_SPECIFIER }} - name: Compute cache key + if: matrix.use-caching id: cache-data - run: echo "key=${{ runner.os }}-deps-$(git submodule status | sha256sum | cut -d ' ' -f1)" | tee -a $GITHUB_OUTPUT + run: echo "key=${{ runner.os }}-deps-$(git submodule status | sha256sum | cut -d ' ' -f1)" >> $GITHUB_OUTPUT - name: Cache dependencies + if: matrix.use-caching id: cache-deps uses: actions/cache@v3 with: @@ -75,6 +80,7 @@ jobs: if: ${{ steps.cache-deps.outputs.cache-hit != 'true' }} run: git submodule update --init --recursive - name: Check if rebuild needed + if: matrix.use-caching id: check-rebuild run: | hash="$(sha256sum go.sum build.go build_test.go | cut -d ' ' -f1)" @@ -99,7 +105,16 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + include: + #- runner-os: ubuntu-latest + # triple: x86_64-unknown-linux-gnu + # use-caching: true + #- runner-os: macos-latest + # triple: x86_64-apple-darwin + # use-caching: true + - runner-os: windows-latest + triple: x86_64-pc-windows-gnu + use-caching: false steps: - name: Checkout repository uses: actions/checkout@v3 @@ -108,9 +123,11 @@ jobs: with: go-version: ${{ env.GO_VERSION_SPECIFIER }} - name: Compute cache key + if: matrix.use-caching id: cache-data run: echo "key=${{ runner.os }}-deps-$(git submodule status | sha256sum | cut -d ' ' -f1)" >> $GITHUB_OUTPUT - name: Cache dependencies + if: matrix.use-caching id: cache-deps uses: actions/cache@v3 with: From 5550fbdce77f8aedaf608a2cc353008d24dddc70 Mon Sep 17 00:00:00 2001 From: mib Date: Tue, 11 Apr 2023 22:49:31 +0200 Subject: [PATCH 33/37] reenable other builders --- .github/workflows/ci.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0bd0fa1..670ec9d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,12 +17,12 @@ jobs: fail-fast: false matrix: include: - #- runner-os: ubuntu-latest - # triple: x86_64-unknown-linux-gnu - # use-caching: true - #- runner-os: macos-latest - # triple: x86_64-apple-darwin - # use-caching: true + - runner-os: ubuntu-latest + triple: x86_64-unknown-linux-gnu + use-caching: true + - runner-os: macos-latest + triple: x86_64-apple-darwin + use-caching: true - runner-os: windows-latest triple: x86_64-pc-windows-gnu use-caching: false @@ -106,12 +106,12 @@ jobs: fail-fast: false matrix: include: - #- runner-os: ubuntu-latest - # triple: x86_64-unknown-linux-gnu - # use-caching: true - #- runner-os: macos-latest - # triple: x86_64-apple-darwin - # use-caching: true + - runner-os: ubuntu-latest + triple: x86_64-unknown-linux-gnu + use-caching: true + - runner-os: macos-latest + triple: x86_64-apple-darwin + use-caching: true - runner-os: windows-latest triple: x86_64-pc-windows-gnu use-caching: false From 907f90cc4561ab55e00ee37c142323545ba5bfa6 Mon Sep 17 00:00:00 2001 From: mib Date: Tue, 11 Apr 2023 22:53:45 +0200 Subject: [PATCH 34/37] use correct nomenclature --- .github/workflows/ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 670ec9d..1aae045 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -28,13 +28,13 @@ jobs: use-caching: false steps: # Download dependencies depending on platform - - name: Download build tools [linux] - if: runner.os == 'Linux' + - name: install build tools [linux] + if: runner.os == 'linux' run: sudo apt-get install build-essential libtool autopoint - - name: Download build tools [mac] + - name: Install build tools [mac] if: runner.os == 'macOS' run: brew install libtool automake gettext - - name: Download build tools [windows] + - name: Install build tools [windows] if: runner.os == 'Windows' uses: msys2/setup-msys2@v2 with: From 6448239ab5d8e79fccd234593caf35e8415fc0f8 Mon Sep 17 00:00:00 2001 From: mib Date: Tue, 11 Apr 2023 22:54:07 +0200 Subject: [PATCH 35/37] remove redundant comment --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1aae045..e543212 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,7 +27,6 @@ jobs: triple: x86_64-pc-windows-gnu use-caching: false steps: - # Download dependencies depending on platform - name: install build tools [linux] if: runner.os == 'linux' run: sudo apt-get install build-essential libtool autopoint From 655eb6ce394d692a0e5bf785aa598d58c158aca1 Mon Sep 17 00:00:00 2001 From: mib Date: Tue, 11 Apr 2023 22:54:15 +0200 Subject: [PATCH 36/37] install dependencies for tests too --- .github/workflows/ci.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e543212..3928bb7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -115,6 +115,31 @@ jobs: triple: x86_64-pc-windows-gnu use-caching: false steps: + - name: install build tools [linux] + if: runner.os == 'linux' + run: sudo apt-get install build-essential libtool autopoint + - name: Install build tools [mac] + if: runner.os == 'macOS' + run: brew install libtool automake gettext + - name: Install build tools [windows] + if: runner.os == 'Windows' + uses: msys2/setup-msys2@v2 + with: + update: true + install: + base-devel + git + subversion + mercurial + libtool + automake + autoconf + automake-wrapper + mingw-w64-i686-toolchain + mingw-w64-x86_64-toolchain + mingw-w64-i686-cmake + mingw-w64-x86_64-cmake + - name: Checkout repository uses: actions/checkout@v3 - name: Setup go From 88b76e04b8c79806f4f7f52d17e9182ff2717ca0 Mon Sep 17 00:00:00 2001 From: mib Date: Tue, 11 Apr 2023 22:57:36 +0200 Subject: [PATCH 37/37] add triple to tests job name --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3928bb7..3dcb136 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -98,7 +98,7 @@ jobs: tor/src/app/tor test: - name: Tests + name: Tests ${{ matrix.triple }} needs: build runs-on: ${{ matrix.os }} strategy: