diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index bcb3715d3..000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: build -on: - pull_request: ~ - push: - branches: - - main -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: - - 'PHP-7.4' - - 'PHP-8.0.0' - steps: - - uses: actions/checkout@v2 - - run: make pull - - run: echo PHP_BRANCH=${{ matrix.php }} >> .env - - run: make - timeout-minutes: 30 - - uses: actions/upload-artifact@v2 - with: - name: ${{ matrix.php }}-web.wasm - path: | - build/php-web.wasm - build/php-web.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..4c52146fd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: Build Docker image +on: + pull_request: + branches: + - main +jobs: + bake: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + # - + # name: Login to DockerHub + # uses: docker/login-action@v3 + # with: + # username: ${{ secrets.DOCKERHUB_USERNAME }} + # password: ${{ secrets.DOCKERHUB_TOKEN }} + - + uses: docker/bake-action@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 3b7962b4d..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: release -on: - push: - tags: - - 'v*' -jobs: - release: - runs-on: "ubuntu-latest" - steps: - - uses: actions/checkout@v2 - - uses: dawidd6/action-download-artifact@v2 - with: - workflow: build.yml - branch: main - workflow_conclusion: success - github_token: ${{secrets.GITHUB_TOKEN}} - name: PHP-7.4-web.wasm - path: build/PHP-7.4-web.wasm - - uses: dawidd6/action-download-artifact@v2 - with: - workflow: build.yml - branch: main - github_token: ${{secrets.GITHUB_TOKEN}} - name: PHP-8.0.0-web.wasm - path: build/PHP-8.0.0-web.wasm - - name: Zip artifacts - run: | - cd build - zip -r ../php-7.4-web.zip PHP-7.4-web.wasm - zip -r ../php-8.0.0-web.zip PHP-8.0.0-web.wasm - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - draft: false - prerelease: false - - name: Upload PHP-7.4-web - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: php-7.4-web.zip - asset_name: php-7.4-web.zip - asset_content_type: application/zip - - name: Upload PHP-8.0.0-web - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: php-8.0.0-web.zip - asset_name: php-8.0.0-web.zip - asset_content_type: application/zip diff --git a/source/phpw.c b/source/phpw.c index 2488f02af..4b60591ca 100644 --- a/source/phpw.c +++ b/source/phpw.c @@ -12,11 +12,10 @@ int main() { void phpw_flush() { - // output buffers are disabled by default so we don't need to flush - // fflush(stdout); fprintf(stdout, "\n"); - // fflush(stderr); + fflush(stdout); fprintf(stderr, "\n"); + fflush(stderr); } char *EMSCRIPTEN_KEEPALIVE phpw_exec(char *code)