From 3c1b349950f5183b32a4f7a19b5ef00e0e782f37 Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Wed, 1 Nov 2023 13:20:38 -0700 Subject: [PATCH 01/17] vendored openssl --- .github/workflows/openssl.sh | 0 .github/workflows/release.yml | 227 ++++++++++++++++++---------------- Cargo.lock | 11 ++ Cargo.toml | 1 + 4 files changed, 131 insertions(+), 108 deletions(-) create mode 100644 .github/workflows/openssl.sh diff --git a/.github/workflows/openssl.sh b/.github/workflows/openssl.sh new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5009edf..e1aacd5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,138 +4,149 @@ on: push: tags: ["*"] +env: + OPENSSL_VER: openssl-1.1.1n + jobs: windows: runs-on: windows-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v1 - - name: Build release binary - run: cargo build --verbose --locked --release + - name: Build release binary + run: cargo build --verbose --locked --release - - name: Upload artifacts - uses: actions/upload-artifact@v1 - with: - name: foreman-win64 - path: target/release/foreman.exe + - name: Upload artifacts + uses: actions/upload-artifact@v1 + with: + name: foreman-win64 + path: target/release/foreman.exe macos: runs-on: macos-latest timeout-minutes: 20 steps: - - uses: actions/checkout@v1 - - - name: Install Rust - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - rustup target install aarch64-apple-darwin - rustup target install x86_64-apple-darwin - - - name: Build x86_64 release binary - run: | - source $HOME/.cargo/env - cargo build --verbose --locked --release --target x86_64-apple-darwin - - - name: Upload Intel (x86_64) artifacts - uses: actions/upload-artifact@v1 - with: - name: foreman-macos-x86_64 - path: target/x86_64-apple-darwin/release/foreman - - - name: Cleanup finished x86_64 build - run: rm -rf ./target - - - name: Build arm64 release binary - run: | - source $HOME/.cargo/env - cargo build --verbose --locked --release --target aarch64-apple-darwin - - - name: Upload arm64 artifacts - uses: actions/upload-artifact@v1 - with: - name: foreman-macos-arm64 - path: target/aarch64-apple-darwin/release/foreman + - uses: actions/checkout@v1 + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + rustup target install aarch64-apple-darwin + rustup target install x86_64-apple-darwin + + - name: Build x86_64 release binary + run: | + source $HOME/.cargo/env + cargo build --verbose --locked --release --target x86_64-apple-darwin + + - name: Upload Intel (x86_64) artifacts + uses: actions/upload-artifact@v1 + with: + name: foreman-macos-x86_64 + path: target/x86_64-apple-darwin/release/foreman + + - name: Cleanup finished x86_64 build + run: rm -rf ./target + + - name: Cache OpenSSL + uses: actions/cache@v2 + with: + path: | + ${{ env.OPENSSL_VER }}-install + key: ${{ env.OPENSSL_VER }}-darwin-arm64-static + + - name: Build arm64 release binary + run: | + source $HOME/.cargo/env + source .github/workflows/openssl.sh + cargo build --verbose --locked --release --target aarch64-apple-darwin + + - name: Upload arm64 artifacts + uses: actions/upload-artifact@v1 + with: + name: foreman-macos-arm64 + path: target/aarch64-apple-darwin/release/foreman linux: runs-on: ubuntu-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v1 - - name: Build - run: cargo build --locked --verbose --release + - name: Build + run: cargo build --locked --verbose --release - - name: Upload artifacts - uses: actions/upload-artifact@v1 - with: - name: foreman-linux - path: target/release/foreman + - name: Upload artifacts + uses: actions/upload-artifact@v1 + with: + name: foreman-linux + path: target/release/foreman release: runs-on: ubuntu-latest timeout-minutes: 15 - needs: ['windows', 'macos', 'linux'] + needs: ["windows", "macos", "linux"] steps: - - uses: actions/checkout@v1 - - name: Download artifacts - uses: actions/download-artifact@v2 - with: - path: artifacts - - run: | - zip -rj foreman-win64.zip ./artifacts/foreman-win64/* - zip -rj foreman-macos-x86_64.zip ./artifacts/foreman-macos-x86_64/* - zip -rj foreman-macos-arm64.zip ./artifacts/foreman-macos-arm64/* - zip -rj foreman-linux.zip ./artifacts/foreman-linux/* - - name: Create release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - draft: true - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - - - name: Upload windows build - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./foreman-win64.zip - asset_name: foreman-win64.zip - asset_content_type: application/zip - - - name: Upload macos build - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./foreman-macos-x86_64.zip - asset_name: foreman-macos-x86_64.zip - asset_content_type: application/zip - - - name: Upload macos build (arm64) - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./foreman-macos-arm64.zip - asset_name: foreman-macos-arm64.zip - asset_content_type: application/zip - - - name: Upload linux build - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./foreman-linux.zip - asset_name: foreman-linux.zip - asset_content_type: application/zip + - uses: actions/checkout@v1 + - name: Download artifacts + uses: actions/download-artifact@v2 + with: + path: artifacts + - run: | + zip -rj foreman-win64.zip ./artifacts/foreman-win64/* + zip -rj foreman-macos-x86_64.zip ./artifacts/foreman-macos-x86_64/* + zip -rj foreman-macos-arm64.zip ./artifacts/foreman-macos-arm64/* + zip -rj foreman-linux.zip ./artifacts/foreman-linux/* + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + draft: true + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + + - name: Upload windows build + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./foreman-win64.zip + asset_name: foreman-win64.zip + asset_content_type: application/zip + + - name: Upload macos build + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./foreman-macos-x86_64.zip + asset_name: foreman-macos-x86_64.zip + asset_content_type: application/zip + + - name: Upload macos build (arm64) + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./foreman-macos-arm64.zip + asset_name: foreman-macos-arm64.zip + asset_content_type: application/zip + + - name: Upload linux build + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./foreman-linux.zip + asset_name: foreman-linux.zip + asset_content_type: application/zip diff --git a/Cargo.lock b/Cargo.lock index 77719e0..ee5f480 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -399,6 +399,7 @@ dependencies = [ "env_logger", "insta", "log", + "openssl", "reqwest", "rpassword", "semver", @@ -879,6 +880,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "111.28.0+1.1.1w" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ce95ee1f6f999dfb95b8afd43ebe442758ea2104d1ccb99a94c30db22ae701f" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.92" @@ -887,6 +897,7 @@ checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] diff --git a/Cargo.toml b/Cargo.toml index c9d7b12..6e61c4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,6 +35,7 @@ urlencoding = "2.1.0" zip = "0.5" url = "2.4.1" artiaa_auth = { path = "./artiaa_auth" } +openssl = { version = "0.10.41", features = ["vendored"] } [target.'cfg(windows)'.dependencies] command-group = "1.0.8" From dd925a26b777260feaa2162a5c25a6cd757d7b37 Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Wed, 1 Nov 2023 15:33:57 -0700 Subject: [PATCH 02/17] version bump --- Cargo.lock | 2 +- Cargo.toml | 2 +- tests/snapshots/help_command.snap | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee5f480..12b529e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -390,7 +390,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "foreman" -version = "1.4.0" +version = "1.5.0" dependencies = [ "artiaa_auth", "assert_cmd", diff --git a/Cargo.toml b/Cargo.toml index 6e61c4f..9609f5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ default-members = [".", "artiaa_auth"] [package] name = "foreman" description = "Toolchain manager for simple binary tools" -version = "1.4.0" +version = "1.5.0" authors = [ "Lucien Greathouse ", "Matt Hargett ", diff --git a/tests/snapshots/help_command.snap b/tests/snapshots/help_command.snap index 2f07938..08cd5cf 100644 --- a/tests/snapshots/help_command.snap +++ b/tests/snapshots/help_command.snap @@ -2,7 +2,7 @@ source: tests/cli.rs expression: content --- -foreman 1.4.0 +foreman 1.5.0 USAGE: foreman [FLAGS] From ee5465ab7dce75bcdaee790810958a460c126aba Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Wed, 1 Nov 2023 15:36:14 -0700 Subject: [PATCH 03/17] add openssl.sh --- .github/workflows/openssl.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/openssl.sh b/.github/workflows/openssl.sh index e69de29..d348a6d 100644 --- a/.github/workflows/openssl.sh +++ b/.github/workflows/openssl.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -x +set -e + +OPENSSL_VER=${OPENSSL_VER:-openssl-1.1.1n} +OPENSSL_DST=${PWD}/${OPENSSL_VER}-install + +if [[ ! -d ${OPENSSL_DST} ]]; then + curl -O https://www.openssl.org/source/${OPENSSL_VER}.tar.gz + tar xzf ${OPENSSL_VER}.tar.gz + cd ${OPENSSL_VER} + ./Configure no-shared enable-rc5 zlib darwin64-arm64-cc --prefix=${OPENSSL_DST} --openssldir=${OPENSSL_DST} + make -j2 + make install + cd - +fi + +export OPENSSL_DIR=${OPENSSL_DST} \ No newline at end of file From 0ba8123e0882e42dd0f9c0c06cc36be7784d92f8 Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Wed, 1 Nov 2023 15:51:34 -0700 Subject: [PATCH 04/17] split up mac arm 64 into it's own job --- .github/workflows/release.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e1aacd5..1febfa9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: name: foreman-win64 path: target/release/foreman.exe - macos: + macos-x86-64: runs-on: macos-latest timeout-minutes: 20 @@ -48,8 +48,17 @@ jobs: name: foreman-macos-x86_64 path: target/x86_64-apple-darwin/release/foreman - - name: Cleanup finished x86_64 build - run: rm -rf ./target + macos-arm64: + runs-on: macos-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v1 + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + rustup target install aarch64-apple-darwin + rustup target install x86_64-apple-darwin - name: Cache OpenSSL uses: actions/cache@v2 @@ -89,7 +98,7 @@ jobs: release: runs-on: ubuntu-latest timeout-minutes: 15 - needs: ["windows", "macos", "linux"] + needs: ["windows", "macos-x86-64", "macos-arm64", "linux"] steps: - uses: actions/checkout@v1 - name: Download artifacts From b33bf03ed2014a855cd4dc3e571595120b8bb99c Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Wed, 1 Nov 2023 16:15:44 -0700 Subject: [PATCH 05/17] remove bash for builds using windows --- .github/workflows/ci.yml | 106 +++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 55 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c97967..6e5853b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,54 +3,51 @@ name: CI on: push: branches: - - main + - main pull_request: branches: - - main + - main jobs: checks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Setup Rust toolchain - shell: bash - run: rustup default stable + - name: Setup Rust toolchain + shell: bash + run: rustup default stable - - name: Rustfmt - shell: bash - run: cargo fmt -- --check + - name: Rustfmt + shell: bash + run: cargo fmt -- --check - - name: Clippy - shell: bash - run: cargo clippy + - name: Clippy + shell: bash + run: cargo clippy build: needs: checks timeout-minutes: 15 strategy: matrix: - os: [windows-latest, ubuntu-latest] - rust_version: [stable, "1.66.0"] + os: [windows-latest, ubuntu-latest] + rust_version: [stable, "1.66.0"] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Setup Rust toolchain - shell: bash - run: rustup default ${{ matrix.rust_version }} + - name: Setup Rust toolchain + run: rustup default ${{ matrix.rust_version }} - - name: Build - shell: bash - run: cargo build --locked --verbose + - name: Build + run: cargo build --locked --verbose - - name: Run tests - shell: bash - run: cargo test --locked --verbose + - name: Run tests + run: cargo test --locked --verbose end-to-end-tests: strategy: @@ -61,16 +58,16 @@ jobs: needs: build steps: - - uses: actions/checkout@v2 - - - name: End-to-end tests - shell: bash - run: | - cargo install --path . - foreman --version - PATH=$PATH:~/.foreman/bin - ./scripts/end-to-end-tests.sh - + - uses: actions/checkout@v2 + + - name: End-to-end tests + shell: bash + run: | + cargo install --path . + foreman --version + PATH=$PATH:~/.foreman/bin + ./scripts/end-to-end-tests.sh + kill-process-test-unix: strategy: matrix: @@ -79,16 +76,16 @@ jobs: runs-on: ${{ matrix.os }} needs: build steps: - - uses: actions/checkout@v2 - - - name: kill-process-test-unix - shell: bash - run: | - cargo install --path . - foreman --version - PATH=$PATH:~/.foreman/bin - ./scripts/kill-process-test-unix.sh - + - uses: actions/checkout@v2 + + - name: kill-process-test-unix + shell: bash + run: | + cargo install --path . + foreman --version + PATH=$PATH:~/.foreman/bin + ./scripts/kill-process-test-unix.sh + kill-process-test-windows: strategy: matrix: @@ -96,13 +93,12 @@ jobs: runs-on: ${{ matrix.os }} needs: build steps: - - uses: actions/checkout@v2 - - - name: kill-process-test-windows - shell: pwsh - run: | - cargo install --path . - foreman --version - $env:Path += '%USERPROFILE%/.foreman/bin' - .\scripts\kill-process-test-windows.ps1 - + - uses: actions/checkout@v2 + + - name: kill-process-test-windows + shell: pwsh + run: | + cargo install --path . + foreman --version + $env:Path += '%USERPROFILE%/.foreman/bin' + .\scripts\kill-process-test-windows.ps1 From f2deb82835a825aaf2fe179ef1bf58bbc3938fe4 Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Thu, 2 Nov 2023 10:12:17 -0700 Subject: [PATCH 06/17] removed bash shell for windows os --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e5853b..e98b7e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,6 @@ jobs: - uses: actions/checkout@v2 - name: End-to-end tests - shell: bash run: | cargo install --path . foreman --version From ebe6368e93fe678fc55e5b99bd1910a48c19c511 Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Thu, 2 Nov 2023 10:33:20 -0700 Subject: [PATCH 07/17] split out end to end tests by os --- .github/workflows/ci.yml | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e98b7e9..cf8aa17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,30 +49,36 @@ jobs: - name: Run tests run: cargo test --locked --verbose - end-to-end-tests: - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - - runs-on: ${{ matrix.os }} + end-to-end-tests-ubuntu: + runs-on: ${{ ubuntu-latest }} needs: build - steps: - uses: actions/checkout@v2 - - name: End-to-end tests + - name: End-to-end tests ubuntu + shell: bash run: | cargo install --path . foreman --version PATH=$PATH:~/.foreman/bin ./scripts/end-to-end-tests.sh - kill-process-test-unix: - strategy: - matrix: - os: [ubuntu-latest] + end-to-end-tests-windows: + runs-on: windows-latest + needs: build + steps: + - uses: actions/checkout@v2 - runs-on: ${{ matrix.os }} + - name: End-to-end tests windows + shell: pwsh + run: | + cargo install --path . + foreman --version + $env:Path += '%USERPROFILE%/.foreman/bin' + bash end-to-end-tests.sh + + kill-process-test-unix: + runs-on: ubuntu-latest needs: build steps: - uses: actions/checkout@v2 @@ -86,10 +92,7 @@ jobs: ./scripts/kill-process-test-unix.sh kill-process-test-windows: - strategy: - matrix: - os: [windows-latest] - runs-on: ${{ matrix.os }} + runs-on: windows-latest needs: build steps: - uses: actions/checkout@v2 From 658bb145c671a912555db5185c0cec6792121fe9 Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Thu, 2 Nov 2023 10:51:39 -0700 Subject: [PATCH 08/17] typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf8aa17..261a887 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: run: cargo test --locked --verbose end-to-end-tests-ubuntu: - runs-on: ${{ ubuntu-latest }} + runs-on: ubuntu-latest needs: build steps: - uses: actions/checkout@v2 From 071ba36bb27161dbc64a40d8657aa72f3302841e Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Thu, 2 Nov 2023 11:18:10 -0700 Subject: [PATCH 09/17] use right path for end to end test script --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 261a887..bcca73a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,7 @@ jobs: cargo install --path . foreman --version $env:Path += '%USERPROFILE%/.foreman/bin' - bash end-to-end-tests.sh + bash .\scripts\end-to-end-tests.sh kill-process-test-unix: runs-on: ubuntu-latest From 05f7d3b7ee1ccaaba568a1d986410f043dc3466c Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Thu, 2 Nov 2023 13:31:37 -0700 Subject: [PATCH 10/17] cmd instead of powershell --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcca73a..a0b284f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,11 +70,11 @@ jobs: - uses: actions/checkout@v2 - name: End-to-end tests windows - shell: pwsh + shell: cmd run: | cargo install --path . foreman --version - $env:Path += '%USERPROFILE%/.foreman/bin' + set PATH=%PATH%;%USERPROFILE%/.foreman/bin bash .\scripts\end-to-end-tests.sh kill-process-test-unix: From 4ef7ef46991ad7c85f2cd57b7c2fe36e043ae94f Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Thu, 2 Nov 2023 14:15:44 -0700 Subject: [PATCH 11/17] default shell --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0b284f..c3ef034 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,11 +70,10 @@ jobs: - uses: actions/checkout@v2 - name: End-to-end tests windows - shell: cmd run: | cargo install --path . foreman --version - set PATH=%PATH%;%USERPROFILE%/.foreman/bin + $env:Path += '%USERPROFILE%/.foreman/bin' bash .\scripts\end-to-end-tests.sh kill-process-test-unix: From 2bb94f9e1f4acad8307bb4c27d65d66aed991dd7 Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Thu, 2 Nov 2023 14:19:29 -0700 Subject: [PATCH 12/17] specify powershell shell --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3ef034..bcca73a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,6 +70,7 @@ jobs: - uses: actions/checkout@v2 - name: End-to-end tests windows + shell: pwsh run: | cargo install --path . foreman --version From 5ddb945b0c118972ee37099a03f1443ba16afe8c Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Thu, 2 Nov 2023 14:41:37 -0700 Subject: [PATCH 13/17] increase build timeout --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcca73a..d186781 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: build: needs: checks - timeout-minutes: 15 + timeout-minutes: 20 strategy: matrix: os: [windows-latest, ubuntu-latest] From 9818dd3e2605f91c1bde1ba1dcb383f252c2d027 Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Thu, 2 Nov 2023 15:17:07 -0700 Subject: [PATCH 14/17] split bash into new step --- .github/workflows/ci.yml | 10 +++++++--- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d186781..87cc5f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,13 +69,17 @@ jobs: steps: - uses: actions/checkout@v2 - - name: End-to-end tests windows + - name: install foreman from source shell: pwsh run: | cargo install --path . foreman --version - $env:Path += '%USERPROFILE%/.foreman/bin' - bash .\scripts\end-to-end-tests.sh + + - name: End-to-end tests windows + shell: bash + run: | + PATH=$PATH:~/.foreman/bin + ./scripts/kill-process-test-unix.sh kill-process-test-unix: runs-on: ubuntu-latest diff --git a/Cargo.lock b/Cargo.lock index 12b529e..5178c82 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -850,9 +850,9 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "a9dfc0783362704e97ef3bd24261995a699468440099ef95d869b4d9732f829a" dependencies = [ "bitflags 2.4.0", "cfg-if", @@ -882,18 +882,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.28.0+1.1.1w" +version = "300.1.6+3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ce95ee1f6f999dfb95b8afd43ebe442758ea2104d1ccb99a94c30db22ae701f" +checksum = "439fac53e092cd7442a3660c85dde4643ab3b5bd39040912388dcdabf6b88085" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.92" +version = "0.9.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" +checksum = "2f55da20b29f956fb01f0add8683eb26ee13ebe3ebd935e49898717c6b4b2830" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index 9609f5a..c65a4dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ urlencoding = "2.1.0" zip = "0.5" url = "2.4.1" artiaa_auth = { path = "./artiaa_auth" } -openssl = { version = "0.10.41", features = ["vendored"] } +openssl = { version = "0.10.58", features = ["vendored"] } [target.'cfg(windows)'.dependencies] command-group = "1.0.8" From c2ebdb21fe65a9f3a448bc7f1a3f1383583569b9 Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Thu, 2 Nov 2023 15:48:23 -0700 Subject: [PATCH 15/17] use correct script --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87cc5f5..7a1b147 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,7 +79,7 @@ jobs: shell: bash run: | PATH=$PATH:~/.foreman/bin - ./scripts/kill-process-test-unix.sh + ./scripts/end-to-end-tests.sh kill-process-test-unix: runs-on: ubuntu-latest From 3dd539be4cee47f2f3ba4ce8dcb1aceea57a57ef Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Thu, 2 Nov 2023 16:34:14 -0700 Subject: [PATCH 16/17] run foreman commands instead of cargo run --- scripts/end-to-end-tests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/end-to-end-tests.sh b/scripts/end-to-end-tests.sh index a50b565..0d83251 100755 --- a/scripts/end-to-end-tests.sh +++ b/scripts/end-to-end-tests.sh @@ -21,20 +21,20 @@ write_foreman_toml () { verify_github_tool () { write_foreman_toml github $1 $2 $3 - cargo run --release -- install + foreman install verify_tool_version $1 $3 rm foreman.toml # for compatibility, verify that `source` also works write_foreman_toml source $1 $2 $3 - cargo run --release -- install + foreman install verify_tool_version $1 $3 rm foreman.toml } verify_gitlab_tool () { write_foreman_toml gitlab $1 $2 $3 - cargo run --release -- install + foreman install verify_tool_version $1 $3 rm foreman.toml } @@ -44,7 +44,7 @@ verify_install_all_before_fail () { echo "$1 = { github = \"$2\", version = \"=$3\" }" >> foreman.toml { # try - cargo run --release -- install + foreman install } || { # finally verify_tool_version $1 $3 From 0d20def08501c9bb0f98ac413f854cb6667da5f9 Mon Sep 17 00:00:00 2001 From: Aiden Fujiwara Date: Thu, 2 Nov 2023 16:57:22 -0700 Subject: [PATCH 17/17] foreman instead of cargo run --- scripts/kill-process-test-unix.sh | 2 +- scripts/kill-process-test-windows.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kill-process-test-unix.sh b/scripts/kill-process-test-unix.sh index 12b4bbf..6a3479c 100755 --- a/scripts/kill-process-test-unix.sh +++ b/scripts/kill-process-test-unix.sh @@ -18,7 +18,7 @@ create_rojo_files() { setup_rojo() { write_foreman_toml github rojo "rojo-rbx/rojo" "7.3.0" - cargo run --release -- install + foreman install create_rojo_files } diff --git a/scripts/kill-process-test-windows.ps1 b/scripts/kill-process-test-windows.ps1 index 22006bb..2f94b40 100644 --- a/scripts/kill-process-test-windows.ps1 +++ b/scripts/kill-process-test-windows.ps1 @@ -16,7 +16,7 @@ function create_rojo_files() { function setup_rojo() { write_foreman_toml github rojo "rojo-rbx/rojo" "7.3.0" - cargo run --release -- install + foreman install create_rojo_files }